July 15, 2017

Core PHP: The If Else Statement (5.1)

If Else

The example below will output the greatest number of the two.
<?php
$x = 10;
$y = 20;
if ($x >= $y) {
   echo $x;
} else {
   echo $y;
}

// Outputs "20"
?>

No comments:

Post a Comment