This would place dates upto 10 days ago into an array..
<?php $w = 0;
$i = 1;
while($w <= 9) {
$daysago[$i] = strtotime('-'.$i.' day');
$daysago[$i] = date("Y-m-d", $daysago[$i]);
$w++;
echo $daysago[$i].' - '.$i.' days ago<br />'; // Not needed, this just shows each array item with the number of days..
$i++;
}?>
If you can work out a way to check the post date against the array you should be able to archieve what you want...
So basically the above makes an array...
year-month-day
10 times over, with the bottom item being 10 days ago...
Wp stores post dates with the time in this format...
yyyy-mm-dd h:i:s
So you'll need to grab posts where the date matches in part, any one of the array items...
in_array() should be able to do it, along with strpos or preg_match....
Sorry just thinking PHP a little out loud...
If you don't know PHP you'll proberly just be baffled by the above, if not you should have all you need to know to create what you want. There may be a better way, no in fact there proberly is an easier way, but i've not had to write something like this so couldn't say...
In theory, easy...
In practice, not so...
Any real PHP coders here? :-)