PHP 输出两个指定日期之间的所有日期
function printDates($start,$end){ $dt_start = strtotime($start); $dt_end = strtotime($end); while ($dt_start<=$dt_end){ echo date('Y-m-d',$dt_start)."<br>"; $dt_start = strtotime('+1 day',$dt_start); } } printDates('2019-1-1','2019-07-05');