There are two variables $ a and $ b, the values ​​of which are numbers. How to display the maximum number of these two?

    2 answers 2

    For example:

    echo $a > $b ? $b : $a; 

    Or so:

     if ($a > $b){ echo $a; } else { echo $b; } 
    • Will issue $ b at $ a = $ b - lyhoshva

    Max () function

     echo max($a, $b);