如何获取两个日期之间的所有日期[重复]

This question already has an answer here:

I have check-in column and check-out column in my mysql table. I am posting this dates with UI-Datepicker.

eg: I am trying to block the dates in the datepicker. I have dates like this in database

check in = 2015-06-15

check out = 2015-06-20

Now i want to get dates like this

2015-06-15, 2015-06-16, 2015-06-17, 2015-06-18, 2015-06-19, 2015-06-20

How to get dates like above I mentioned. So please help me and resolve my problem.

</div>
<?php
$date_from = strtotime("10 September 2000");
$date_to = strtotime("15 September 2000");

function list_days($date_from,$date_to){
    $arr_days = array();
    $day_passed = ($date_to - $date_from); //seconds
    $day_passed = ($day_passed/86400); //days

    $counter = 1;
    $day_to_display = $date_from;
    while($counter < $day_passed){
        $day_to_display += 86400;
        //echo date("F j, Y 
", $day_to_display);
        $arr_days[] = date('o-m-d',$day_to_display);
        $counter++;
    }

    return $arr_days;
}

print_r(list_days($date_from,$date_to));
?>