I have a trouble with strtotime in php.
$j = "2013-10-27";
for ($x = 0; $x < 100; $x++) {
$j = date('Y-m-d', strtotime($j) + 86400);
echo ' '.$j.' <br/>';
}
As the code is self explained, it will add one day to $j and then display to browser. But when $j = "2013-10-27", it prints just one result ("2013-10-27"). If I change $j to another date, this does work, but also stucks at this date (and some other date).
I have written other code to do this work. But does anyone know why it fails, or my code is wrong?
Thank you.