$interval=$data['interval']*60; #间隔分钟数 $forenoon_start = strtotime($data['forenoon_start']); #开始时间 $forenoon_end = strtotime($data['forenoon_end']);#件数时间 $time = $forenoon_start; $key = 0; do { $Idata[$key]['start'] = date('H:i',$time); $time +=$interval; $Idata[$key]['end'] = date('H:i',$time); $Idata[$key]['type'] = 1; $Idata[$key]['store_id'] = $this->info['store_id']; $key++; } while ($forenoon_end > $time);