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');
转载于:https://www.cnblogs.com/ryanzheng/p/11140047.html
最后
以上就是秀丽咖啡豆最近收集整理的关于PHP 输出两个指定日期之间的所有日期的全部内容,更多相关PHP内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复