<html>
<body>
$t = date("H");
echo "<p>The hour (of the server) is " . $t;
echo ", and will give the following message:</p>";
if ($t < "10") {
echo "Have a good morning!";
} elseif ($t < "20") {
echo "Have a good day!";
} else {
echo "Have a good night!";
}
</body>
<!-- Mirrored from www.w3schools.com/php/phptryit.asp?filename=tryphp_if_elseif by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:29:31 GMT -->
</html>