- print_r: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$start_date = '2014-3-19';
$end_date = '2014-5-19';
$begin = new DateTime( $start_date );
$end = new DateTime(date("Y-m-d",strtotime("+1 day", strtotime($end_date))));
while($begin < $end) {
$period[] = $begin->format('Y-m-d');
$begin->modify('+1 day');
}
print_r($period);