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');输出结果如下: < 上一篇 下一篇 > Ernest Amberg says: July 8, 2020 at 1:18 amWow that was odd. I just wrote an very long comment but after I clicked submit my comment didn’t appear. Grrrr… well I’m not writing all that over again. Anyway, just wanted to say excellent blog!Reply Hertha Zaugg says: August 23, 2020 at 7:13 pmOf course, what a splendid blog and revealing posts, I will bookmark your site.Have an awsome day!Reply Leave a Reply Cancel replyYour email address will not be published. Required fields are marked * ** Save my name, email, and website in this browser for the next time I comment.
Wow that was odd. I just wrote an very long comment but after I clicked submit my comment didn’t appear. Grrrr… well I’m not writing all that over again. Anyway, just wanted to say excellent blog!
Of course, what a splendid blog and revealing posts, I will bookmark your site.Have an awsome day!