|
Posted by Adam Plocher on 01/21/06 01:03
How about something like this....
<?
$start = "2005-05-05";
$end = "2005-06-05";
$init_date = strtotime($start);
$dst_date = strtotime($end);
$offset = $dst_date-$init_date;
$dates = floor($offset/60/60/24) + 1;
for ($i = 0; $i < $dates; $i++)
{
$newdate = date("Y-m-d", mktime(12,0,0,date("m", strtotime($start)),
(date("d", strtotime($start)) + $i), date("Y", strtotime($start))));
echo $newdate ."<br>";
}
?>
Navigation:
[Reply to this message]
|