Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2003022

Re: [PHP] Output Numerical Month as String? From: 1LT John W. Holmes (holmes072000 <email protected>)
Date: 02/25/03

> http://www.zend.com/manual/function.date.php
> --- CF High <noah <email protected>> wrote:
> > Hey all.
> >
> > Easy question here (can't find the answer in php
> > manual)
> >
> > In Cold Fusion I'm able to format a given numerical
> > month value, say the
> > third month, as #MonthAsString(3)# and it returns
> > "March"
> >
> > What's the equivalent in PHP?
> >
> > Thanks for any ideas..........

I know you can use date() and mktime(), but wouldn't it be easier to just
make an array?

$MonthAsString = array (1=>'January',2=>'February',3=>'March',...);

and then just echo $MonthAsString[3] when you need it?

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php