最新下载
热门教程
- 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')
*/
相关文章
- 分享linux里一些非常有趣的命令 09-26
- MC在线玩网页版网址是什么-mc我的世界在线玩网页版免费免登陆入口 09-26
- 通过 FSCK 命令检查 Linux 文件系统中的错误详解 09-26
- 关于Linux系统,你可能还不知道的七件事 09-26
- linux 查看文件内容具体的某一行数据 09-26
- Ubuntu系统怎么安装Flash Player应用? 09-26