- If statement is a compare a statement and equality two number.
- Here, we are check a if / else condition.
<?php
$number1=10;
$number2=20;
if($number1==$number2)
{
echo “Two number are equal <br>”;
}
else if ($number2>$number1)
{
echo “number2 is greater than number1 <br>”;
}
else
{
echo”Two number are not equal <br>”;
}
?>
OUTPUT:-
number2 is greater than number1
0 Comments:
Post a Comment