Function to Generate the 12 Month Names in an Array — PHP
A small PHP function that returns the names of all 12 months in an array.
You can use the function below to generate an array containing the names of all 12 months.
function getMonthArray()
{
$monthArray = array();
for( $i=1; $i <= 12 ; $i++ )
{
$monthArray[] = date('F', mktime(0, 0, 0, $i, 1) );
}
return $monthArray;
}