strtotime("+$day day $second second +$date")
完整代码是这样的:
<?php
$date = date('2013-05-09 11:00:00'); for($day=0; $day<7; $day++)
for($second=0; $second<60; $second++)
echo date('Y-m-d H:i:s', strtotime("+$day day $second second +$date")) . '<br>';
?>
完整代码是这样的:
<?php
$date = date('2013-05-09 11:00:00'); for($day=0; $day<7; $day++)
for($second=0; $second<60; $second++)
echo date('Y-m-d H:i:s', strtotime("+$day day $second second +$date")) . '<br>';
?>
$date = '2013-05-09 11:00:00'则 strtotime("+$day day +$second second $date")
就是 strtotime("+1 day 1 second 2013-05-09 11:00:00")
即返回比 2013-05-09 11:00:00 多 1 天 1 秒 的 unix时间戳
strtotime("+$day day $second second +$date")是指距离$date日期 $day天 $second秒后的时间戳http://www.w3school.com.cn/php/func_date_strtotime.asp
strtotime("+$day day $second second",$date)