title: Calculate days in between given start date and end date in php
body: <p>I have $start_date &amp; $end_date.</p>
  
  <p>I need to find out number of days with name's of days.</p>
  
  <p>I tried following code snipet :</p>
  
  <pre><code>$start_date = '20-07-2012';
  $end_date = '22-07-2012';
  $start = strtotime($start_date);
  $end = strtotime($end_date);
  $interval = 2;
  $out='';
  $int = 24*60*60*$interval;
  for($i= $start;$i&lt;= $end; $i += $int ){
  
      echo date('d-m-Y',$i).'&lt;br /&gt;';
  }
  </code></pre>
  
  <p>output :</p>
  
  <pre><code>28-11-2014
  30-11-2014
  </code></pre>
  
  <p>But my expected out is like :</p>
  
  <pre><code>28-11-2014 =&gt; friday
  30-11-2014 =&gt; saturday
  </code></pre>
  
  <p>let me know what should be php code to yeild the expected output.</p>