note 18871 added to function.date

From: Date: Thu, 07 Feb 2002 20:58:36 +0000
Subject: note 18871 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-26366@lists.php.net to get a copy of this message
Here is a code example that shows "Good Morning", "Good Afternoon" or "Good Night" acording to the actual time: $seconds = date("h")*60*60 + date("i")*60 + date("s"); if (($seconds>0) && ($seconds<21600)) print "Good Night!"; elseif (($seconds>21600) && ($seconds<43200)) print "Good Morning!"; elseif (($segundos>=43200) && ($segundos<64800)) print "Good Afternoon!"; elseif ($segundos>64800) print "Good Night!"; -- http://www.php.net/manual/en/function.date.php http://master.php.net/manage/user-notes.php?action=edit+18871 http://master.php.net/manage/user-notes.php?action=delete+18871 http://master.php.net/manage/user-notes.php?action=reject+18871

« previous php.notes (#26366) next »