title: Sub array from a big array
body: <p>I need to get a sub array from a big array (i dont know the array, it comes from the database), like this:</p>
  
  <pre><code>$array = 
    array(0=&gt;'Name 1',1=&gt;'Name 2',2=&gt;'Name 3',3=&gt;'Name 4',4=&gt;'Name 5',5=&gt;'Name 6');
  </code></pre>
  
  <p>What i need is to get the first 3 elements.</p>
  
  <pre><code>$new_array = array(0=&gt;'Name 1',1=&gt;'Name 2',2=&gt;'Name 3');
  </code></pre>
  
  <p>Thanks!</p>