php get dates for all sundays in a month
<p>I want to be able to come up with a php function that takes in the parameters
year, month and the day and returns the dates for the given day in an array.</p>

<p>for eg. lets say the function looks like this:</p>

<pre><code>function get_dates($month, $year, $day)
{
    ....
}
</code></pre>

<p>if I call the function as below:</p>

<pre><code>get_dates(12, 2011, 'Sun');
</code></pre>

<p>I should get an array containing the values:</p>

<pre><code>2011-12-04
2011-12-11
2011-12-18
2011-12-25
</code></pre>

<p>What would the function code look like?</p>
