title: Day difference without weekends
body: <p>I want to count the total day difference from user input</p>
  
  <p>For example when the user inputs</p>
  
  <p><code>start_date = 2012-09-06</code> and <code>end-date = 2012-09-11</code></p>
  
  <p>For now I  am using this code to find the diffeence</p>
  
  <pre><code>$count = abs(strtotime($start_date) - strtotime($end_date));
  $day   = $count+86400;
  $total = floor($day/(60*60*24));
  </code></pre>
  
  <p>The result of total will be 6. But the problem is that I dont want to include the days at weekend (Saturday and Sunday)</p>
  
  <pre><code>2012-09-06
  2012-09-07
  2012-09-08 Saturday
  2012-09-09 Sunday
  2012-09-10
  2012-09-11
  </code></pre>
  
  <p>So the result will be 4</p>
  
  <p>----update---</p>
  
  <p>I have a table that contains date,the table name is holiday date</p>
  
  <p>for example the table contains <code>2012-09-07</code></p>
  
  <p>So, the total day will be 3, because it didn't count the holiday date</p>
  
  <p>how do I do that to equate the date from input to date in table?</p>