Re: days of week
| From: | Richard Davey | Date: | Thu, 18 Mar 2004 11:48:17 +0000 |
| Subject: | Re: days of week | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180803@lists.php.net to get a copy of this message | ||
Hello Diana,
Thursday, March 18, 2004, 11:38:55 AM, you wrote:
DC> does anyone know of any built in php functions that can convert a day of
DC> week that is in numeric format , e.g. 1 into a Monday (without knowing which
DC> exact date we are talking about)
I can't think of a built-in function that will do this (that doesn't
rely on a date), but it's still quite easy to do:
$days =
array('','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday');
$day_of_week = $days[1]; // <-- Monday
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html