Definition to use Grater than( > ) and less than ( < ) operator in php to return boolean values.
Grater than( > ) and less then( < ) two different type of comparison operator used to compare one value with another. So here is the complete step by step tutorial for Php Greater than Less than Comparison Operator example tutorial.
Grater than ( > ) operator : Grater then operator is returns True if the left side operand is bigger then right side variable. For example if there are two variables like $a = 10 and $b = 20 and we have use grater then operator like $b > $a in this state $b value is bigger then $a value then it will return True other wise False.
Less than ( < ) operator : Less than operator returns True if the left side operand holds smaller value then right side variable or we can say that its just opposite to Grater than operator.
Php Greater than Less than Comparison Operator example tutorial.
Code for GreaterLessThanProgram.php file.
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Php Greater than-Less than Comparison Operator example tutorialn</title> </head> <body> <?php $one = 20; $two = 30; //Greater than operator example var_dump($two > $one); echo '</br>'; //Less than operator example var_dump($one < $two); ?> </body> </html>