title: Find leap years
body: <p>I am working with a php code, to start out i am using the for statment.</p>
  
  <pre><code>for($i=0; $i&lt;4; $i++)
  </code></pre>
  
  <p>Now i understand that $i=0 counts from 0 and $i &lt; $4 means count from 0 to below 4.</p>
  
  <p>What i am trying to achieve is add multiple for statements rather than using multiple php codes.</p>
  
  <pre><code>for($i=0; $i&lt;4; $i++)
  for($i=4; $i&lt;8; $i++)
  for($i=8; $i&lt;12; $i++)
  for($i=12; $i&lt;16; $i++)
  </code></pre>
  
  <p>.......etc so that it lists all the results.</p>
  
  <pre><code>&lt;?php
  $day = "";
  for($i=0; $i&lt;4; $i++)
  {
      $day =  date("d", mktime(0, 0, 0, 2, 29, date("Y")+$i));
      if($day == 29)
      {
          $year = date("Y")+$i;
          break;
      }
  }
  echo "&lt;p&gt;The next leap year is 29th February $year&lt;/p&gt;";    
  ?&gt;
  </code></pre>
  
  <p>echoed result will be:</p>
  
  <p>The next leap year is 29th February 2016</p>
  
  <p>The next leap year is 29th February 2020 </p>