title: extract first 3 items in an array
body: <p><code>$array = array('item1', 'item2', 'item3', 'item4', 'item5');</code></p>
  
  <p>here i want to extract only the <strong>first three items</strong> in the array, and then</p>
  
  <pre><code>$implodes = implode(';', $array);
  
  echo $implodes;
  </code></pre>
  
  <p>which should output</p>
  
  <pre><code>item1;item2;item3
  
  
  $i=0;
  $new = array();
  foreach($array as $arr)
  {
    $i++;
    if($i &lt;= 3)
    {
      $new[] = $arr;
    }
  }
  </code></pre>
  
  <p>doesn't look pretty tho</p>