if else php means code example
Example 1: php else
<?php
if ($a > $b) {
echo "a is greater than b";
} else {
echo "a is NOT greater than b";
}
?>
Example 2: PHP if...else...elseif Statements
<?php
$t = date("H");
if ($t < "20") {
echo "Have a good day!";
}
?>