hd. hd. - 1 month ago 12
PHP Question

How to get the month name from a number in PHP?

I have a variable containing a month number. How can I get the name of the month from this value?

I know I could define an array for

$month_num => $month_name
, but I want to know if there is a time function in PHP that can do this, without the need for an array?

Answer
date("F",mktime(0,0,0,$monthnumber,1,2011));