<?php function createRange($startDate, $endDate) { $tmpDate = new DateTime($startDate); $tmpEndDate = new DateTime($endDate); $outArray = array(); do { $outArray[] = $tmpDate->format('Y-m-d'); } while ($tmpDate->modify('+1 day') <= $tmpEndDate); return $outArray; } print_r( createRange('2010-10-01', '2010-10-05') );
You have javascript disabled. You will not be able to edit any code.