title: PHP compare dates
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4143741/php-date-compare">php date compare</a>  </p>
  </blockquote>
  
  
  
  <p>I have a date that I take from the mySQL database that looks like this:</p>
  
  <pre><code>2011-06-20
  </code></pre>
  
  <p>And I get the date of the current day in this way:</p>
  
  <pre><code>$todaydate = date('Y-m-d');
  </code></pre>
  
  <p>What I need to know is how do I compare the two results?</p>
  
  <p>How can I compare the dates and understand for example if a week is passed from the database date or a month or a year..etc..?</p>
  
  <p>Thank you!!</p>