title: How to get the day(s) of difference between 2 dates
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/676824/how-to-calculate-the-difference-between-two-dates-using-php">How to calculate the difference between two dates using PHP?</a>  </p>
  </blockquote>
  
  
  
  <p>Q : How to get the day(s) of difference between 2 dates?</p>
  
  <p>e.g</p>
  
  <pre><code>&lt;?php 
  echo $date1 = strtotime(date('2012-10-11'));
  echo "&lt;br /&gt;";
  echo $date2 = strtotime(date('2012-11-15'));
  echo "&lt;br /&gt;";
  echo $result = $date2 - $date1;                     
  ?&gt;
  </code></pre>
  
  <p>The $result should be 36 days. How to get the days?</p>