$stimestamp = strtotime($startdate); $etimestamp = strtotime($enddate);
// 计算日期段内有多少天 $days = ($etimestamp-$stimestamp)/86400+1;
// 保存每天日期 $date = array();
for($i=0; $i<$days; $i++){ $date[] = date('Y-m-d', $stimestamp+(86400*$i)); }
return $date; }
2023-08-13 14:44:04