最新下载
热门教程
- 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 $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')
*/
相关文章
- 暗喻幻想:ReFantazio御剑滑行方法 10-29
- 暗喻幻想:ReFantazio黄金虫数量说明 10-29
- 暗喻幻想魔坏之锤获取方法攻略分享 10-29
- 暗喻幻想:ReFantazio难度更改说明 10-29
- 暗喻幻想古井死胡同BOSS打法攻略分享 10-29
- 骗子酒吧骗子骰子游戏规则介绍说明 10-29