Re: convert numerical day of week
| From: | itoctopus | Date: | Wed, 23 May 2007 02:51:12 +0000 |
| Subject: | Re: convert numerical day of week | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-255364@lists.php.net to get a copy of this message | ||
I think what you need is simply something like this:
function get_day($int_day){
$arr_day_of_week = array('1'=>'Sunday',
'2'=>'Monday', '3'=>'Tuesday',
'4'=>'Wednesday', '5'=>'Thurdsay',
'6'=>'Friday', '7'=>'Saturday');
}
echo(get_day(1)); //will print Sunday
--
itoctopus - http://www.itoctopus.com
""Bosky, Dave"" <Dave.Bosky@htcinc.net> wrote in message
news:DE411005B957D442AE1A3D4C1ACDB55905E7D4CA@HTCEXCHANGE.htc.com...
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'.
Thanks,
Dave
**********************************************************************
HTC Disclaimer: The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader of this
message is not the intended recipient, or an employee or agent responsible
for delivering this message to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to the
message and deleting it from your computer. Thank you.
**********************************************************************