CODE: $mydate = strtotime("2011-11-04"); // or: $mydate = mktime(0,0,0,"11","04","2011"); for ($i = 0; $i <= 5; $i++) { echo "<br>" . $mydate . " = " . date("Y-m-d",$mydate); $mydate = $mydate + 24*60*60; // 1-day = 86400 sec. } RESULTS: 1320382800 = 2011-11-04 1320469200 = 2011-11-05 1320555600 = 2011-11-06 1320642000 = 2011-11-06 1320728400 = 2011-11-07 1320814800 = 2011-11-08
It should work, you are probably using an old PHP version? Try doing: echo "<br>" . $mydate . " = " . date("Y-m-d",$mydate + 43200); and see if that makes a difference.
OK, sorry. I figured it out. That was the end of "daylight saving time", so it shows Sunday at 00:00:00 and then again Sunday at 23:00:00.