Re: convert numerical day of week

From: Date: Tue, 22 May 2007 16:51:29 +0000
Subject: Re: convert numerical day of week
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-255331@lists.php.net to get a copy of this message
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"

« previous php.general (#255331) next »