Home › Forums › Back End › PHP Date Problem › Re: PHP Date Problem
July 5, 2011 at 3:10 pm
#82877
Member
and here is how you should calculate the range …
function dateRangeArray($start, $end)
{
$range = array();
if (is_string($start) === true) $start = strtotime($start);
if (is_string($end) === true ) $end = strtotime($end);
do
{
$range[] = date(‘d/m/y’, $start);
$start = strtotime(“+ 1 day”, $start);
}
while($start <= $end);
return $range;
}