Re: convert numerical day of week

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, May 22, 2007 11:46 am, Bosky, Dave wrote:
> How can I convert the numerical day of week to the string version?
>
> Example, if the day of the week is 1 I would like to print out
> 'Sunday'.

$days = array(1=>'Sunday', 'Mondy', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday');
echo $days[$dow];

You could also probably play games with date() function and mktime...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux