note 14896 added to function.getdate.php
| From: | hfuecks at hotmail dot com | Date: | Mon, 20 Aug 2001 11:36:23 +0000 |
| Subject: | note 14896 added to function.getdate.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16911@lists.php.net to get a copy of this message | ||
If you wanted to find which day of the week corresponds to a particular date you could do something
like this (for August 20th, 2001 - a Monday!) ;
<?
$timestamp = mktime(0,0,0,8,20,2001);
$date = getdate ($timestamp);
$dayofweek = $date['wday'];
echo ( "$dayofweek" );
?>
This returns a 1 (0 being Sunday)
http://www.php.net/manual/en/function.getdate.php