Less-than and greater-than : Conditional Operator « Operator « PHP






Less-than and greater-than

 
<?

$age = 8;
if ($age > 17) {
    print "> 17";
}
if ($age >= 65) {
    print ">= 65";
}
$kelvin_temp = 0;

if ($kelvin_temp < 20.3) {
    print "< 20.3";
} 
?>
  
  








Related examples in the same category

1.The trinary operator
2.Conditional Operator
3.Conditional Statements