PHP if-else, switch statement examples.
PHP if-else, switch statement examples.
The hour (of the server) is " . $t;
echo ", and will give the following message:";
if ($t < "10") {
echo "Have a good morning!";
} elseif ($t < "20") {
echo "Have a good day!";
} else {
echo "Have a good night!";
}
?>