Showing posts with label if else program in php. Show all posts
Showing posts with label if else program in php. Show all posts

Wednesday, 5 February 2014

if else condition

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".