note 129198 added to function.date
| From: | Anonymous at main dot php dot net | Date: | Sat, 27 Jan 2024 16:02:28 +0000 |
| Subject: | note 129198 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221152@lists.php.net to get a copy of this message | ||
Being able to choose the date format is very convenient, so you can, for example, put personalized
greetings based on the time:
<?php
$name = $_POST['name'];
$time = date ("H");
if ($time >= 8 && $time < 14)
$greetings= "Good morning ";
else if ($time >= 14 && $time <= 21)
$greetings= "Good teatime, ";
else
$greetings= "Good night, ";
$saudo = $saudo . $name ;
print ($greetings);
?>
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.157.134 (proxied: 139.47.59.124)
----
Manual Page -- https://php.net/manual/en/function.date.php
Edit -- https://main.php.net/note/edit/129198
Del: integrated -- https://main.php.net/note/delete/129198/integrated
Del: useless -- https://main.php.net/note/delete/129198/useless
Del: bad code -- https://main.php.net/note/delete/129198/bad+code
Del: spam -- https://main.php.net/note/delete/129198/spam
Del: non-english -- https://main.php.net/note/delete/129198/non-english
Del: in docs -- https://main.php.net/note/delete/129198/in+docs
Del: other reasons-- https://main.php.net/note/delete/129198
Reject -- https://main.php.net/note/reject/129198
Search -- https://main.php.net/manage/user-notes.php