生成月初月末便于拼接sql
时间:2021-07-01 10:21:17
帮助过:4人阅读
for (
$i=1;
$i < 13;
$i++
) {
2
3 $date =
strtotime(
date("2015-
$i-01"
));
4
5 $firstday =
date("Y-m-01",
$date);
6
7 $lastday =
date("Y-m-t",
$date);
8
9 echo $firstday.‘===‘.
$lastday.‘<br/>‘
;
10 }
生成月初月末便于拼接sql
标签: