title: Date / Night Interval in PHP
body: <p>I'm using a wordpress plugin for booking resorts, and in a part of booking it shows box with your search (check in - check out - nights - number of adult,,, etc.. ) </p>
  
  <p>i want to show number of days as well.. 
  so if total nights is 7 nights, i want to show (8days/7nights) instead of showing (7nights). </p>
  
  <p>here is the php code for this part: </p>
  
  <pre><code>&lt;?php
          $datetime1 = new DateTime($from);
          $datetime2 = new DateTime($to);
          $interval = $datetime1-&gt;diff($datetime2);
          $nights = $interval-&gt;format('%a');
           ?&gt;
  </code></pre>
  
  <p>and showing it like this:</p>
  
  <pre><code>&lt;div&gt;&lt;?php echo '&lt;b&gt;From:&lt;/b&gt; ' . $from . '&amp;nbsp; &lt;b&gt;To:&lt;/b&gt; ' . $to . '&amp;nbsp; &lt;b&gt;No. of nights: &lt;/b&gt; ' . $nights . ' night(s) ' . ''; ?&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Any help will be highly appreciated.</p>
  
  <p>Thanks </p>