title: Difference between dates
body: <blockquote>
    <p><strong>Possible Duplicates:</strong><br>
    <a href="https://stackoverflow.com/questions/2533909/difference-between-dates">Difference between dates</a><br>
    <a href="https://stackoverflow.com/questions/676824/how-to-calculate-the-date-difference-between-2-dates-using-php">How to calculate the date difference between 2 dates using php</a>  </p>
  </blockquote>
  
  
  
  <p>So, I have two dates. For instance, <code>2010-09-24</code> and <code>2010-09-25</code>. I want to check if between those two dates the difference is 1 day. </p>
  
  <p>I don't need to get a value of <code>86400</code> which means one day in seconds. </p>
  
  <p>Don't forget that it can be 28, 28, 29, 30, 31 days in month.</p>
  
  <p>Thanks.</p>
  
  <p>What I have right now, but it doesn't work when there is difference between months:</p>
  
  <pre><code>$strto = strtotime($date);
  $d1 = date('d', $strto);
  $d2 = date('d', time());
  echo $d2- $d1;
  </code></pre>