note 59461 added to function.date
| From: | ernesto dot rgb at gmail dot com | Date: | Wed, 07 Dec 2005 14:21:35 +0000 |
| Subject: | note 59461 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-99695@lists.php.net to get a copy of this message | ||
This function represents a polite way to receive users in our websites. It decides if we are in noon
or afternoon or night. For the latin american people is important to discriminate which one of the
three moments is.
function saludo(){
$ahora = time();
$hora = strftime("%H, %H:%M:%S", $ahora);
if($hora>='00:00:00' && $hora<'12:00:00') echo "Buenos
días";
if($hora>='12:00:00' && $hora<'19:00:00') echo "Buenas
tardes";
if($hora>='19:00:00' && $hora<'24:00:00') echo "Buenas
noches";
}
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59461
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59461&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59461&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59461&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59461&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59461&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59461&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59461&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59461&report=yes
Search -- http://master.php.net/manage/user-notes.php