<?
$hour=date('H');
switch(true)
{
        case ($hour< 12):       echo 'Good Morning';    break;
        case ($hour< 18):       echo 'Good Afternoon';  break;
        default:                echo 'Good Night';      break;
}
?>


Op dinsdag 03 september 2002 13:01, schreef Javier Montserat:
> really simple one -
>
> does someone have a bit of code that will variously display 'good morning',
> 'good afternoon', 'good evening' based on the current time?
>
> good morning from london,
>
> Javier
>
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to