/*** 生成从开始月份到结束月份的月份数组* @param int $start 开始时间* @param int $end 结束时间*/functionmonthList($start,$end){$month_arr=array();$start_timestamp=strtotime($start);$end_timestamp=strtotime($end);$start_timestamp=mktime(0,0,0,date("n",$start_timestamp),1,date("Y",$start_timestamp));$next_timestamp=$start_timestamp;while($next_timestamp<=$end_timestamp){$month_arr[]=date("Y-m",$next_timestamp);$next_timestamp=mktime(0,0,0,date("n",$next_timestamp)+1,date("j",$next_timestamp),date("Y",$next_timestamp));};return$month_arr;}