RE: [PHP] Simple Question on Date conversion
| From: | John W. Holmes | Date: | Wed, 20 Nov 2002 11:54:24 +0000 |
| Subject: | RE: [PHP] Simple Question on Date conversion | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125218@lists.php.net to get a copy of this message | ||
> Dear all
> Can anyone pls tell me how i can turn number : 10 to Oct?
> i counting on the month, that's why i won't to convert the result to
> month!
$months = array(1=>'January',2=>'February',3=>'March',...);
echo $months[$your_month_number];
You could also use a combo of date() and mktime().
echo date('F',mktime(0,0,0,$your_month_number,15,2002);
The day and year part of mktime() can be anything.
---John Holmes...