If-else condition program in php
<?php
$a=10;
if($a=10)
{
echo "this is true";
}
else
{
echo"this is false";
}
?>
o/p= this is true
we take a variable "a" and it's value is 10.
in php we define variable with '$'
after this we define apply if condition . if a = 10 then it print "this is true"
otherwise it print "this is false".
<?php
$a=10;
if($a=10)
{
echo "this is true";
}
else
{
echo"this is false";
}
?>
o/p= this is true
we take a variable "a" and it's value is 10.
in php we define variable with '$'
after this we define apply if condition . if a = 10 then it print "this is true"
otherwise it print "this is false".
No comments:
Post a Comment