Home >Backend Development >PHP Tutorial > 打印前一周的每一天解决思路

打印前一周的每一天解决思路

WBOY
WBOYOriginal
2016-06-13 12:32:16981browse

打印前一周的每一天

$week_start = date("U",mktime(0,0,0,date("m"),date("d")-7,date("Y")));<br />
$week_end = date("U",mktime(23,59,59,date("m"),date("d")-0,date("Y")));<br />
$date=date('Y-m-d',$week_start);<br />
$date1=date('Y-m-d',$week_end);

写到这里不知道该怎么写了。
我想用for循环写可是判断条件不知道怎么写了。。怎么才能把每一天的日期打印出来啊

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn