pogledaj funkcije strototime(), malo je čitljivije sa tim
PHP kôd:
function createDateRangeArray($strDateFrom, $strDateTo)
{
$aryRange = array();
while ($strDateFrom <= $strDateTo)
{
$aryRange[] = $strDateFrom;
$strDateFrom = date("Y-m-d", strtotime ("+1 day", strtotime($strDateFrom)));
}
return $aryRange;
}
A mislim da ti je lakse i sa explode("-", $date) nego onoliki substr()...