note 31119 added to function.getdate
| From: | hairy dot harry at softhome dot NOSPAM dot net | Date: | Thu, 10 Apr 2003 09:31:37 +0000 |
| Subject: | note 31119 added to function.getdate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46445@lists.php.net to get a copy of this message | ||
The following code can be used to get the date arrays for the week ahead. It maps the details of the
next seven days into the arrays $today, $tomorrow, $da2, etc... I used it when writing a php
calendar, with a "Week Ahead" view.
$today = getdate();
$tomorrow = getdate(time()+86400);
$da2 = getdate(time()+86400*2);
$da3 = getdate(time()+86400*3);
$da4 = getdate(time()+86400*4);
$da5 = getdate(time()+86400*5);
$da6 = getdate(time()+86400*6);
--
http://www.php.net/manual/en/function.getdate.php
http://master.php.net/manage/user-notes.php?action=edit+31119
http://master.php.net/manage/user-notes.php?action=delete+31119
http://master.php.net/manage/user-notes.php?action=reject+31119