$start = "2008-06-11";
$end = "2008-06-13";
$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 ."
";
}
?>
No comments:
Post a Comment