title: Calculate all dates between 2 dates in php?
body: <p>I have 2 dates</p>
  
  <pre><code>$st_date = '2012-07-20';
  $ed_date = '2012-07-27';
  </code></pre>
  
  <p>I want to display all dates from <code>$st_date</code> to <code>$ed_date</code>
  As:</p>
  
  <pre><code>2012-07-20
  2012-07-21
  2012-07-22
  2012-07-23
  2012-07-24
  2012-07-25
  2012-07-26
  2012-07-27
  </code></pre>
  
  <p>I thought first count difference, run foreach &lt; count, and add $i day to $st_date.<br>
  But i don't want loop, it increases code. Any of direct date() which return an array of all-dates.</p>