1$begin = new DateTime( "2015-07-03" );
2$end = new DateTime( "2015-07-09" );
3
4for($i = $begin; $i <= $end; $i->modify('+1 day')){
5 echo $i->format("Y-m-d");
6}
1$startTime = strtotime( '2010-05-01 12:00' );
2$endTime = strtotime( '2010-05-10 12:00' );
3
4// Loop between timestamps, 24 hours at a time
5for ( $i = $startTime; $i <= $endTime; $i = $i + 86400 ) {
6 $thisDate = date( 'Y-m-d', $i ); // 2010-05-01, 2010-05-02, etc
7}
8