PHP Detects the part of the day
Detects the part of the day
<?
$hour = date("H");
if ($hour < 12) { echo "Good morning"; }
else {
if($hour < 18) { echo "Good afternoon"; }
else { echo "Good evening"; }
}
?>
<?
$hour = date("H");
if ($hour < 12) { echo "Good morning"; }
else {
if($hour < 18) { echo "Good afternoon"; }
else { echo "Good evening"; }
}
?>