Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP Date Problem Re: PHP Date Problem

#82877
xyzoblivion
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;
}