title: calculate sundays between two dates
body: <p>I want to calculate all Sunday's between given two dates. I tried following code. It works fine if days are less but if i enter more days. It keeps processing and Maximum execution time exceeds  i changed the time but it even keeps processing even execution time is 200sec. </p>
  
  <p>code is</p>
  
  <pre><code>&lt;?php
  $one="2013-01-01";
  $two="2013-02-30";
  
  $no=0;
  for($i=$one;$i&lt;=$two;$i++)
  {
  
      $day=date("N",strtotime($i));
      if($day==7)
      {
      $no++;
      }
  }
  echo $no;
  
  ?&gt;
  </code></pre>
  
  <p>please help.</p>