<html>
<head>
    <title>Nested if Statement</title>
</head>
<body>
    <h1>Nested 'if' Statement</h1>

<?php

    $now  = time();                     //current date and time
    $hour = date("H", $now);            //get the hour component
    
    if ($hour < 12)
    {
        echo "<b> Good Morning - ";     
    }
    else
    {
        if ($hour < 18)
            echo "<b> Good Afternoon - ";       
        else
            echo "<b> Good Evening - ";     
    }

    echo "</b> the time is now " , date("r", time());
?>

<?php include "zCode/include.php"; ?>              <!-- hyperlink to see the code -->
</body>
</html>