Source Code:
(back to article)
<?php // Example 1 $x = 5; if ($x == 5): echo "The value of x is 5." . PHP_EOL; endif; // Output: The value of x is 5. // Example 2 $x = 10; if ($x > 5): echo "The value of x is greater than 5."; else: echo "The value of x is less than or equal to 5."; endif; // Output: The value of x is greater than 5.
Result:
Report an issue