Variable Functionality
Sample 1 : Variables Use in Echo
I am going to use variables hereSample 2 : Variable rules
Variable Rules given bellow- can be contained alpha numeric characters
- 1st character should contain underscore or alphabet
- 1st character can not be number or digit
- Try to ignore understand ( _ ) as 1st character of variable
Because mostly major PHP personal variables start with underscore. - Variable starts with Dollar Sign ($)
- Try to write variables in small latters
- Single File Variables Can not connect with other file variables.
Sample 3 : simple print veritable command
100Sample 4 : Variables Adding Command
100+50+50 = is the right answer.200 = is the right answer.
Sample 5 : Variable Replacing Rule
Getting Error In this Code, I'll modify tomorrowWhat is Your Name?
My Name is samee.
<html>
<head>
<title>Samee : Variable Functionality in PHP : 1st Day Coding lecture</title>
</head>
<body>
<h1 align="center">Variable Functionality</h1>
<h2 align="left">Sample 1 : Variables Use in Echo</h2>
<?php echo "I am going to use variables here" ?>
<h2 align="left">Sample 2 : Variable rules</h2>
<?php echo "Variable Rules given bellow <br/>
<ol>
<li>can be contained alpha numeric characters</li>
<li>1st character should contain underscore or alphabet</li>
<li>1st character can not be number or digit</li>
<li>Try to ignore understand ( _ ) as 1st character of variable <br />
Because mostly major php personal variables start with underscore. </li>
<li>Variable starts with Dollar Sign ($)</li>
<li>Try to write variables in small latters</li>
<li>Single File Variables Can not connect with other file variables.</li> </ol>" //4th point is pointed by Teacher ?>
<h2 align="left">Sample 3 : simple print variable command</h2>
<?php $a=100;
echo "$a" #Here 100 is assigned to a ?>
<h2 align="left">Sample 4 : Variables Adding Command</h2>
<?php $a=100;
$b=50;
$c=50;
echo "$a+$b+$c = is the right answer. <br />" //values will be hold from above veriables ?>
<?php $a=100;
$b=50;
$c=50;
$d=$a+$b+$c;
echo "$d = is the right answer." ?>
<h2 align="left">Sample 5 : Variable Replacing Rule</h2>
<?php echo "Getting Error In this Code, I'll modify tomorrow<br />"?>
<?php echo "<b>What is Your Name? </b><br />";
$name=100;
$name="samee";
echo "My Name is $name." ?>
</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