最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php生成按指定时间以来的,年、季度、月份的下拉列表
时间:2022-06-24 18:35:54 编辑:袖梨 来源:一聚教程网
代码如下 | 复制代码 |
function countSeason($start,$end){ $temp = date("Y-m",strtotime("$start +3month")); while ($temp <= $end){ $time[] = $temp; $temp = date("Y-m",strtotime("$temp +3month")); } return $time; } $time = countSeason("2008-10",date("Y-m")); ?> |
/*
直接循环
如果是月,则循环变量每次增加1(月)
如果是年,则每次增加12(月),
同时输出date('Y-m')或者 date('Y')
*/
相关文章
- 波场 05-02
- 狗狗币能涨到5万美刀吗 05-02
- 游戏dau下降 05-02
- btc行情 05-02
- 从零开始学虚拟货币交易 05-02
- 比特币实时交易策略 05-02