An array of dates in PHP

How can I make an array of existing dates? I need an array with dates from the month of september to may, preferably no holidays. For 2011-2012


Answer 1, authority 100%

$start = strtotime('09/01/2010');
$finish = strtotime('05/31/2011');
$arrayOfDates = array();
  for($i=$start; $i<$finish; $i+=86400){
  list($year,$month,$day) = explode("|",date("Y|m|d",$i));
  $arrayOfDates[$year][$month][] = $day;
}
print_r($arrayOfDates);

P.S. datecan specify the day of the week.

if(date('D',$i)!='Sun' && date('D',$i)!='Sat');

Such a condition in the loop will exclude weekends.