title: PHP Determine Monthly Day of Week
body: <p>I've seen lots of "Date" related questions here, however, I haven't been able to find one that calculates this:</p>
  
  <p>I am trying to figure out the numerical value of a given date string.  For example:</p>
  
  <pre><code> $date = "2010-09-01";
  </code></pre>
  
  <p>Given the date above, how might I be able to determine that this is the "1st" Wednesday of the month.</p>
  
  <p>I know that: <code>date("l", $date);</code>  will tell me that it's a Wednesday, but how do I determine if it's the 1st, 2nd, 3rd, or 4th Wednesday of the Month?</p>
  
  <p>Any help on this would be great! </p>