title: how to make group of two array with given array in php?
body: <p>i have one array and elements like:-</p>
  
  <pre><code>enter code here
  $array =  array('1', '2', '3', '4','5','6'); // n number of elements
  echo "&lt;pre&gt;"; print_r($array); die;
  </code></pre>
  
  <p>when i print this array its give me this result</p>
  
  <pre><code>enter code here
  Array
  (
  [0] =&gt; 1
  [1] =&gt; 2
  [2] =&gt; 3
  [3] =&gt; 4
  [4] =&gt; 5
  [5] =&gt; 6
  )
  </code></pre>
  
  <p>i want output something like:-</p>
  
  <pre><code>enter code here
  Array
  (
  
  [0] =&gt; Array
      (
          [0] =&gt; 1
          [1] =&gt; 2
      )
  [1] =&gt; Array
      (
          [0] =&gt; 3
          [1] =&gt; 4
      )
  [2] =&gt; Array
      (
          [0] =&gt; 5
          [1] =&gt; 6
      )
  )
  </code></pre>
  
  <p>Can anyone help me how i can make two group of elements 
  Not:- array elements are dynamic it may be <strong>n</strong> number of elements</p>