title: insert batch data array?
body: <p>I want insert following data by <code>insert_batch</code> as in following example in database table (mysql):</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;input name="u_id[0][0]" value="76"&gt;
  
  &lt;input name="un[0][0]" value="1"&gt;
  &lt;input type="text" name="ue[0][0]" value="11"&gt;
  &lt;input type="text" name="up[0][0]" value="111"&gt;
  
  
  
  &lt;input name="u_id[1][0]" value="77"&gt;
  
  &lt;input name="un[1][1]" value="2"&gt;
  &lt;input type="text" name="ue[1][1]" value="22"&gt;
  &lt;input type="text" name="up[1][1]" value="222"&gt;
  
  &lt;input name="un[1][2]" value="3"&gt;
  &lt;input type="text" name="ue[1][2]" value="33"&gt;
  &lt;input type="text" name="up[1][2]" value="333"&gt;
  </code></pre>
  
  <p>PHP:</p>
  
  <pre><code>$u_id       = $this-&gt;input-&gt;post('u_id');
  $un       = $this-&gt;input-&gt;post('un');
  $up       = $this-&gt;input-&gt;post('up');
  $ue       = $this-&gt;input-&gt;post('ue');
  
  $data = array();
  foreach ($un as $idx =&gt; $name) {
      $data[] = array(
          'u_id' =&gt; $u_id[$idx],                  
          'un' =&gt; $un[$idx],
          'up' =&gt; $up[$idx],
          'ue' =&gt; $ue[$idx],
      );
  };
  $this -&gt; db -&gt; insert_batch('units', $data);
  </code></pre>
  
  <p>I want insert they as this:</p>
  
  <p><img src="https://i.stack.imgur.com/AjwXP.png" alt="enter image description here"></p>
  
  <p>How should change php code and html code? what do i do?</p>