title: Splitting of array into multiple arrays
body: <p>I have an array of dynamic length L1. I need to split this array into L2 number of arrays each having <code>LEN[i]</code> numbers from the original array.</p>
  
  <pre><code>EX:
  Original:
  
   $array=[1,2,3,4,5,6,7,8,9,10]
  
  Here L1=10
  
  L2=3
  
  $LEN=[3,3,4]
  
  So the 3 arrays will be
  
  $a1=[1,2,3]
  
  $a2=[4,5,6]
  
  $a3=[7,8,9,10]
  </code></pre>
  
  <p>I have tried a lot of ways but nothing seems to be working. 
  Any help would be greatly appreciated. </p>