I have this code:
<?
// Get current month and year
// If no $month or $year is supplied it will use the current month/year
$month = (empty($month)) ? date("n") : $month;
$year = (empty($year)) ? date("Y") : $year;
$first_day = mktime(0,0,0,$month,1,$year);
$links = date("n",$first_day);
$temp = $new = $old = $year;
$prev = $links - 1;
$next = $links + 1;
if ($links == 1)
{
$old = $year - 1;
$prev = 12;
}
if ($links == 12)
{
$new = $year + 1;
$next = 1;
}
?>
... and I need to be able to display $month as the full name ("F"), but I still need to use the ("n") format to move between months.
I was thinking of creating an array: $month_name("", "January", "February", etc...) and then using $month's number as the pointer in that array, but I have no idea how to do it.
Any suggestions?