0
I need the loop
be executed 10 times, and that each loop
the variable $tempo
that has the date, hour, minute and seconds receive +10 seconds, but that in the final result is not displayed in fragmented seconds, ex 08, 15, 59, wish only integers, or more specifically 00
, 10
, 20
, 30
, 40
, 50
.
The result of the variable $tempo
in the loop
should be something like:
2001_12_15_001510
2001_12_15_001520
2001_12_15_001530
2001_12_15_001540
2001_12_15_001550
2001_12_15_001600
2001_12_15_001610
2001_12_15_001620
2001_12_15_001630
2001_12_15_001640
I could only get the seconds in integer numbers without the loop with
if(in_array($segundos, range("00", "09"))){
$segundos = "00";
}
On which operating system? A short answer depends on the
strptime()
to convert the date into the format2001-12-15 00:15:19
, but this function is not implemented in Windows.– rodorgas
I’m running php on windows
– Florida