title: calculate the difference between two dates with strtotime
body: <p>I want to echo how much days are left between a variable and NOW. This is the code</p>
  
  <pre><code>$now = date('Y-m-d'); 
  $daysleft=  strtotime($starttheproject -$now);
  </code></pre>
  
  <p><code>echo 
  "Now =".$now.
  "&lt;br&gt; Starttheproject =".$starttheproject.
  "&lt;br&gt; Daysleft =".$daysleft;</code></p>
  
  <p><strong>Result of echo:</strong></p>
  
  <ul>
  <li>Row =2014-10-17 </li>
  <li>Starttheproject =2014-10-22 </li>
  <li>Daysleft =</li>
  </ul>
  
  <p><strong>Question:</strong>
  How can calculate the number of days, so that the result will be '5'
  I've been playing with code like this, with no luck:</p>
  
  <pre><code>$daysleft=  date('Y-m-d', strtotime($starttheproject -$now));
  </code></pre>