PHP头条
热点:

php怎么判断时间连续性


php 如何判断时间连续性?
$time = array('2011-10-25','2011-10-27','2011-11-01');等等,如何判断时间是否是连续的?

------解决方案--------------------
strtotime('2011-10-25');后判断。
------解决方案--------------------
mktime() strtotime date 这三个函数就可以做到 自己研究去吧
------解决方案--------------------
相邻2个转换成时间戳相减是否为一天的时间戳(如果一天算连续的话)
------解决方案--------------------
整个数组时间连续还是部分连续?
整个数组连续的:
PHP code

------解决方案--------------------
刚才在另一个帖子 贴出了我的方法
是以时间递增一天算得:
PHP code

$a = array('2011-10-30','2011-10-31','2011-11-01');


$flag = true;
for($i=0;$i

www.phpzy.comtrue/phprm/43131.htmlTechArticlephp怎么判断时间连续性 php 如何判断时间连续性? $time = array('2011-10-25','2011-10-27','2011-11-01');等等,如何判断时间是否是连续的? ------解决方案-------------------- strtotime('2011-10-25');后判断。...

相关文章

PHP之友评论

今天推荐