title: PHP foreach: splitting the loop into two parts
body: <p>I want to split the loop into two, but I can't figure it out!</p>
  
  <p>I want to loop three items from the array first, and then displaying the remaining items like this,</p>
  
  <pre><code>01 Home
  02 Portfolio
  03 Blog
  
  {my website logo}
  
  04 About
  05 Contact
  06 Feed
  </code></pre>
  
  <p>This is code where I am stuck in,</p>
  
  <pre><code>&lt;?php
      $index = 0;
  
      foreach($items as $item) 
      {
  
      ?&gt;
      &lt;li&gt;0&lt;?php echo $index+1;?&gt;&lt;a href="#"&gt;&lt;?php echo $item['name'];?&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;?php   
      $index ++;
      }
  
  ?&gt;
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Thanks.</p>