Home > Backend Development > PHP Tutorial > 帮忙看一下这段代码那里有问题.

帮忙看一下这段代码那里有问题.

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-23 14:09:15
Original
1200 people have browsed it

<?php$date1=date('Y-m-d 	',"1367769600"); for ($date1=1;$date1 <=9; $date1++){}$date2=date('H-i-s',"-2211742800")for ($date2=1;$date2 <=60; $date2++){ } echo $date1." ."$date2?>
Copy after login

原本想的功能是日期逐渐加八天,秒数逐渐加60秒...php新手,希望大家帮忙解答:(


回复讨论(解决方案)

$date = date('Y-m-d H:i:00'); for($day=0; $day<8; $day++)  for($second=0; $second<60; $second++)    echo date('Y-m-d H:i:s', strtotime("+$day day +$second second $date")) . '<br>';
Copy after login
Copy after login

高手啊 豁然开朗

$date = date('Y-m-d H:i:00'); for($day=0; $day<8; $day++)  for($second=0; $second<60; $second++)    echo date('Y-m-d H:i:s', strtotime("+$day day +$second second $date")) . '<br>';
Copy after login
Copy after login



+$day day +$second second $date 这里我还是不明白

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template