title: array_slice - how come this doesn't work in foreach
body: <p>total noob here. I've an array which looks like:</p>
  
  <pre><code>Array
  (
      [15] =&gt; Array
        (
          [0] =&gt; Array
              (
                  [id] =&gt; 5216
                  [name] =&gt; Grow your own Irish Shamrock gifts set
                  [ordered] =&gt; 473
                  [image] =&gt; FunShamrockPot.jpg
              )
  
          [1] =&gt; Array
              (
                  [id] =&gt; 5217
                  [name] =&gt; Irish Shamrock Seeds
                  [ordered] =&gt; 357
                  [image] =&gt; FunShamrockSeed.jpg
              )
  
          [2] =&gt; Array
              (
                  [id] =&gt; 5759
                  [name] =&gt; Ireland Fleece with Shamrock Badge
                  [ordered] =&gt; 1
                  [image] =&gt; IrelandFleeceShamrocks.jpg
              )
  
      )
  
      [31] =&gt; Array
        (
          [0] =&gt; Array
              (
                  [id] =&gt; 5081
                  [name] =&gt; Tartan Guinness Flat Cap
                  [ordered] =&gt; 356
                  [image] =&gt; GuinnessTartanFlatCap.jpg
              )
  
          [1] =&gt; Array
              (
                  [id] =&gt; 4894
                  [name] =&gt; Black signature emblem Guinness baseball hat
                  [ordered] =&gt; 176
                  [image] =&gt; GuinnessSigBBHat.jpg
              )
  </code></pre>
  
  <p>The array is called $products and I'm trying to just print out the first five arrays in each top array (if that makes sense) in other words, array[15]&lt;-- first five arrays under 15, array[31]&lt;-- first 5 arrays in here.</p>
  
  <p>the code I'm trying is:</p>
  
  <pre><code>foreach($products as $key=&gt;$value) {
      array_slice($value, 0, 5);
      foreach($value as $product) {
          echo $product['name'] . '&lt;br/&gt;';
      }
      echo '&lt;br/&gt;';
  }
  </code></pre>
  
  <p>I can't figure out why array_slice won't work, what am I doing wrong?</p>