evibesmusic
asked on
Convert month number to month name
How can I convert month number into month date?
$Month = $getinfo2['Month'];
$Month is stored as 1-12, so that in the db January =1, February=2, etc.
How can I get the value of $Month not as a number but, as a name?
$Month = $getinfo2['Month'];
$Month is stored as 1-12, so that in the db January =1, February=2, etc.
How can I get the value of $Month not as a number but, as a name?
A cleaner way of doing it:
$monthNumber = 8;
$monthName = date("F", mktime(0, 0, 0, $monthNumber, 1, 2010));
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Like a glove my friend. Perfect. Thanks.
LOL@asafadis, if you think that is "cleaner" than what I posted.
@andyc75, that does exactly the same thing as mine, but mine does not rely on any external functions.
evibesmusic has chosen the solution s/he like the best, but I think dissing other Expert's ideas is really out of line for both of you.
@andyc75, that does exactly the same thing as mine, but mine does not rely on any external functions.
evibesmusic has chosen the solution s/he like the best, but I think dissing other Expert's ideas is really out of line for both of you.
$monthname = $monthnamearray[$monthnumb
The minus 1 is because arrays are 0-indexed.