Re: convert numerical day of week

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

 



Hi,

Wednesday, May 23, 2007, 2:46:38 AM, you wrote:
BD> How can I convert the numerical day of week to the string version?

BD> Example, if the day of the week is 1 I would like to print out 'Sunday'.

BD>  

BD> Thanks,

BD> Dave


<?php
$day =2;
//for a Monday start
echo gmdate('l',($day + 3) * 24 * 60 * 60)."\n";
// for a Sunday start
echo gmdate('l',($day + 2) * 24 * 60 * 60)."\n";

-- 
regards,
Tom

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