Forum Moderators: coopster
$start_month = '5'; // May
$start_year = '2006'; // 2006$dates = array();
for ($i=0; $i<6; $i++)
{$previous = date("n,Y", mktime(0,0,0,($start_month-$i),0,$start_year));
$dates[] = $previous;
}
print_r($dates);
As May is specified as the start date above, the first month would be April. etc
dc