Kanishka Panamaldeniya Kanishka Panamaldeniya - 5 months ago 31
PHP Question

is there a way to get month name by giving an integer value PHP

hi i am using PHP i want to pass an integer value (1-12) and get corresponding month name , is there a way in PHP to do that or i have to do t my own by initialize a month names array.

i want to do like

$month_name = get_month_name(1);

echo $month_name ; //echo january

thanks in advance

echo date('F', strtotime("2012-$int-01"));