Use the boolean compare operators : Logical Operators « Operator « PHP
- PHP
- Operator
- Logical Operators
Use the boolean compare operators
<?
$three = 3;
$four = 4;
$my_pi = 3.14159;
if (($three == $three) and
($four === $four) and
($three != $four) and
($three < $four) and
($three <= $four) and
($four >= $three) and
($three <= $three) and
($my_pi > $three) and
($my_pi <= $four))
print("Yes!<BR>");
else
print("No?<BR>");
?>
Related examples in the same category