Display of Variables in PHP
$Name, $_class, $ali
Sample 1 : Common way of Variable
The Answer is = 150
Sample 2 : Variable within double qoutes with curly brackets
My age is 22.
Sample 3 : Variable within double quotes without curly brackets
My age is round about 22.
<html>
<head>
<title>Variable Display in PHP : 3rd Day Lecture</title>
</head>
<body>
<h1 align="center">Display of Variables in PHP<br />
$Name, $_class, $ali</h1>
<h2 align="left">Sample 1 : Common way of Variable</h2>
<?php $a = 100;
$b = 50;
$c = $a + $b;
echo "The Answer is = ".$c ?>
<h2 align="left">Sample 2 : Variable within double qoutes with curly brackets</h2>
<?php $age = 22;
echo "My age is {$age}." #Variable within quotes is defined between curly brackets
?>
<h2 align="left">Sample 3 : Variable within double quotes without curly brackets</h2>
<?php $age=22;
echo "My age is round about $age." //Variable within quotes is defined without curly brackets
?>
</body>
</html>
Post a Comment
Give your reviews about this blog. Leave your comments. what do you think about this post?
Comments Description is given below:
1) I love to read comments, but do not spam.
2) Like this blog and also tweet its posts.
3) You can use some xHTML tags.
4) All Comments are Do Follow, Please try to use blog professionally.
5) Mention Your Name below the comment.
6) You can also suggest for improvement.
7) Do not forget to subscribe Samee Articles blog.
---------------------------------------
Thanks for visiting QWC.Me.
==========================================
For free guidelines contact me on SEO Expert | Samee Ullah Feroz is online there.
==========================================
Best Regards