Re: convert numerical day of week

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

 



Hi Dave,

Tuesday, May 22, 2007, 5:46:38 PM, you 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', 2 => 'Monday', 3 => 'Tuesday', etc ...);

then just

$today = $days[1]; // Sunday
$today = $days[3]; // Tuesday

Cheers,

Rich
-- 
Zend Certified Engineer
http://www.corephp.co.uk

"Never trust a computer you can't throw out of a window"

-- 
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