title: Group elements in collections of arrays
body: <p>I have this code, it fetches data from CSV file using splFileObject:</p>
  
  <pre><code>while(!$this-&gt;_file-&gt;eof()){
       $data[$i] = $this-&gt;_file-&gt;fgetcsv();
  }
  </code></pre>
  
  <p>This is the result :</p>
  
  <pre><code>array(12) {
    [0]=&gt;
    array(1) {
      [0]=&gt;
      string(41) "134550;651099595;3004050;1340.03;16/04/15"
    }
    [1]=&gt;
    array(1) {
      [0]=&gt;
      string(41) "134333;651099594;3004051;1500.03;10/08/15"
    }
   [2]=&gt;
    array(1) {
      [0]=&gt;
      string(41) "134550;651099595;3004050;1340.03;16/04/15"
    }
    [3]=&gt;
    array(1) {
      [0]=&gt;
      string(41) "134333;651099594;3004051;1500.03;10/08/15"
    }
  }
  </code></pre>
  
  <p>What I want to do , is to group the arrays by collections of 2 (or whatever) like this (e.g of count = 2):</p>
  
  <pre><code> array(12) {
      [0] =&gt; 
      array(2){
            [0]=&gt;
         array(1) {
          [0]=&gt;
          string(41) "134550;651099595;3004050;1340.03;16/04/15"
          }
             [1]=&gt;
          array(1) {
          [0]=&gt;
          string(41) "134550;651099595;3004050;1340.03;16/04/15"
          }
      }
      [1] =&gt;
      array(2){
            [0]=&gt;
         array(1) {
          [0]=&gt;
          string(41) "134550;651099595;3004050;1340.03;16/04/15"
          }
             [1]=&gt;
          array(1) {
          [0]=&gt;
          string(41) "134550;651099595;3004050;1340.03;16/04/15"
          }
      }
  }
  </code></pre>