<?php 
$period = new \DatePeriod(
    new \DateTime('-10 day'),
    new \DateInterval('P1D'),
    new \DateTime('now')
);

echo '<pre>';
print_r($period);
echo '</pre>';

foreach ($period as $date) {
    echo '<pre>';
    print_r($date->format("Y-m-d"));
    echo '</pre>';
}