Jeg tror du kan bruge denne funktion:
<?
function DatesBetween($startDate, $endDate){
// get the number of days between the two given dates.
$days = (strtotime($endDate) - strtotime($startDate)) / 86400 + 1;
$startMonth = date("m", strtotime($startDate));
$startDay = date("d", strtotime($startDate));
$startYear = date("Y", strtotime($startDate));
$dates;//the array of dates to be passed back
for($i=0; $i<$days; $i++){
$dates[$i] = date("n/j/Y", mktime(0, 0, 0, $startMonth , ($startDay+$i), $startYear));
}
return $dates;
}
?>
Fundet på:
http://www.php.net/date -> mybenchmarkid at yahoo dot com : 13-Feb-2007 10:55