title: array_slice in multidimensional array?
body: <p>I have an array in php like this :</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
                [915] =&gt; 1
                [1295] =&gt; 1
                [1090] =&gt; 1
                [1315] =&gt; 0.93759357774
                [128] =&gt; 0.93759357774
                [88] =&gt; 0.731522789561
                [1297] =&gt; 0.731522789561
                [1269] =&gt; 0.525492880722
                [1298] =&gt; 0.525492880722
                [121] =&gt; 0.519133966069
           )
     [1] =&gt; Array
         (
                [585] =&gt; 1
                [1145] =&gt; 1
                [1209] =&gt; 1
                [375] =&gt; 1
                [1144] =&gt; 1
                [913] =&gt; 1
                [1130] =&gt; 0.996351158355
                [215] =&gt; 0.937096401456
                [1296] =&gt; 0.879373313559
                [30] =&gt; 0.866473953643
                [780] =&gt; 0.866473953643
                [1305] =&gt; 0.866473953643
                [1293] =&gt; 0.866473953643
         )
  
  ) 
  </code></pre>
  
  <p>How do I get the 1st-5th rows of sub-array for each array, like this :</p>
  
  <p>Result :</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
                [915] =&gt; 1
                [1295] =&gt; 1
                [1090] =&gt; 1
                [1315] =&gt; 0.93759357774
                [128] =&gt; 0.93759357774
           )
     [1] =&gt; Array
         (
                [585] =&gt; 1
                [1145] =&gt; 1
                [1209] =&gt; 1
                [375] =&gt; 1
                [1144] =&gt; 1
         )
  
  )
  </code></pre>