title: PHP Split Multidimensional array into smaller chunks of array
body: <p>I have an multidimensional array which has images names and image label. This array sometimes gets as large as over 100K. I need to split this array into small chunks lets says 10K chunks as I need to get image name from each array and add that image which is stored locally into zip file. </p>
  
  <p>Example of array:</p>
  
  <pre><code>Array ( 
  [0] =&gt; Array ( [sku] =&gt; 1 [image] =&gt; 1-gbc.jpg [image_label] =&gt; 1 GBC EB100000) 
  [1] =&gt; Array ( [sku] =&gt; 2 [image] =&gt; 2-ib575037.jpg [image_label] =&gt; 2 IB575037) 
  [2] =&gt; Array ( [sku] =&gt; 3 [image] =&gt; 3-s0190303-paper-mate.jpg [image_label] =&gt; 3 Paper Mate S0190303 )
  )
  </code></pre>
  
  <p>I need to split this into smaller chunks because it sometimes get impossible to add all the images for one array into single zip files which is why I need to create separate zip for each array chunk.</p>
  
  <p>I have tried to user array_chunk but it is not working for me am I doing something wrong.</p>
  
  <pre><code>images = array_chunk($array, 10000);
  </code></pre>