Less than : Logical Operators « Operator « PHP






Less than



<?
$a = 21;
$b = 15;
echo "<P>Original value of \$a is $a and \$b is $b</P>";

if ($a < $b) {
    echo "<P>TEST\$a is less than \$b</P>";
} else {
    echo "<P>TEST\$a is not less than \$b</P>";
}
?>
           
       








Related examples in the same category

1.Logical Operators in Order of Precedence
2.Use the boolean compare operators
3.Greater than
4.Greate and equal
5.Less than and equal
6.Not equal: !=
7.Logical Operators
8.Logic Operators in PHP
9.Or operator
10.Leap Year Determination
11.Negation operator
12.The not-equals operator
13.Relational Operators summary table
14.Relational Operators in action