PHP Month Number to Month Name
By gilbitron in PHP on 31/03/2009 at 03:17
Starter:
An easy way to convert a month number to a month name without a switch statement.
Main Course:
$monthName = date("F", mktime(0, 0, 0, $monthNum, 10));
Expand Report Code | Install Coda Clip
Please log in to vote.








Comment by http://www.myopenad.com on 30/05/2009 at 03:07
http://www.myopenad.com
Comment by Christopher Shennan on 27/07/2009 at 07:41
Fantastic... This was a nice quick solution to my problem. I was after the month names from November to Aprils so I tweaked this as follows:
for($i=1;$i
Comment by Christopher Shennan on 27/07/2009 at 07:42
Fantastic... This was a nice quick solution to my problem. I was after the month names from November to Aprils so I tweaked this as follows:
for($i=1;$i<=6;$i++) {
echo date("F", mktime(0, 0, 0, (($i+10) % 12), 10));
}