If_Statement
<?php
$a = 30;
$b = 10;
$c = "40";
$d = 40;
if($a > $b)
{
echo "A is Greater than B";
}
echo "<br>";
if($a < $b)
{
echo "B is Greater than A";
}
echo "Here, is other Statement";
echo "<br>";
if($c == $d)
{
echo "Both c and d are Same<br>";
}
echo "Here, is other Statement<br>";
if($c === $d)
{
echo "Both c and d are same in case of Value and Data Types<br>";
}
echo "Here, is Other Statement<br>";
echo "Below is the another way for performing If() Statement<br>";
if($c == $d):
echo "Both c and d are same<br>";
endif;
echo "<br>";
if($c === $d):
echo "Both c and d are same in case of Value and Data Types<br>";
endif;
echo "Here, is another Statement<br>";
//OUTPUT:
//A is Greater than B
// Here, is other Statement
// Both c and d are Same
// Here, is other Statement
// Here, is Other Statement
// Below is the another way for performing If() Statement
// Both c and d are same
// Here, is another Statement
?>
Comments
Post a Comment