That leaves out the last date in the range, and also returns an empty array if both dates are the same.
Here's another suggestion:
$startDate = '2009-01-28';
$enddate = '2009-01-30';
$dates = array($startDate);
while ($startDate != $enddate) {
$startDate = date('Y-m-d', strtotime($startDate . ' +1 day'));
$dates[] = $startDate;
}
print_r($dates);