title: Get Weekend Dates in php
body: <p>I am working on a php application which requires that I extract the dates of the weekends between two dates and then insert them as single records in the mysql database.</p>
  
  <p>I was thinking if there was a simpler way of doing it, rather than going through the loop between start date and end date and for each date checking if <code>date('l', strtotime($date))</code> returns "Saturday" or "Sunday"</p>
  
  <p>Thanks for your time</p>
  
  <p>Sunil</p>