$start_date = '2010-12-24';
$end_date = '2011-10-06';
function getMonthArray($start_date, $end_date){
$start_timestamp = strtotime(str_replace('-', '/', $start_date));
$end_timestamp = strtotime(str_replace('-', '/', $end_date));
$start_month_timestamp = strtotime(date('F Y', $start_timestamp));
$current_month_timestamp = strtotime(date('F Y', $end_timestamp));
$arr_month = array();
while( $current_month_timestamp >= $start_month_timestamp ) {
$arr_month[strtolower(date('M_y', $end_timestamp))] = date('F Y', $end_timestamp);
$end_timestamp = strtotime('-1 month', $end_timestamp);
$current_month_timestamp = strtotime(date('F Y', $end_timestamp));
}
return $arr_month;
}
$arr_month = getMonthArray($start_date, $end_date);
Демо