title: Insert several array of value different in new row from database
body: <p>I want insert in the row from database, array of values as that each of they put in new row from database.</p>
  
  <p>I not want insert all values in a row from database with use of serialize(json_encode or etc).</p>
  
  <p><strong>For example:</strong>(in this example, i want three times insert data(value), because i have 3 value different)
  <strong>Update 4:</strong></p>
  
  <p>this my value:</p>
  
  <pre><code>&lt;input name="name[0][]" value="11"&gt;
  &lt;input name="passport_number[0][]" value="11"&gt;
  
  
  &lt;input name="name[1][]" value="22"&gt;
  &lt;input name="passport_number[1][]" value="22"&gt;
  </code></pre>
  
  <p>i do it, but it not worked:</p>
  
  <pre><code>$name_input = $this-&gt;input-&gt;post('name');
  $passport_number_input        = $this-&gt;input-&gt;post('passport_number');
  //$term_passport_input = $this-&gt;input-&gt;post('term_passport');
  //$date_of_birth_input       = $this-&gt;input-&gt;post('date_of_birth');
  //$age_input        = $this-&gt;input-&gt;post('age');
  //$national_number_input = $this-&gt;input-&gt;post('national_number');
  //$mobile_input       = $this-&gt;input-&gt;post('mobile');
  //$address_input        = $this-&gt;input-&gt;post('address');
  
  $data = array();
  foreach ($name_input as $idx =&gt; $name) {
      $data[] = array(
          'name' =&gt; $name_input[0]
          'passport_number' =&gt; $passport_number_input[0],
          //'term_passport' =&gt; $term_passport_input[$idx],
          //'date_of_birth' =&gt; $date_of_birth_input[$idx],
          //'age' =&gt; $age_input[$idx],
          //'national_number' =&gt; $national_number_input[$idx],
          //'mobile' =&gt; $mobile_input[$idx],
          //'address' =&gt; $address_input[$idx],
      );
  };
  var_dump($name_input);
  $this-&gt;db-&gt;insert_batch('customer_info', $data);
  </code></pre>
  
  <p>This is output '$name_input' with <code>var_dump</code>:</p>
  
  <pre><code>array(2) {
      [0] = &gt; array(1) {
          [0] = &gt; string(2)"11"
      }[1] = &gt; array(1) {
          [0] = &gt; string(2)"22"
      }
  }
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>A PHP Error was encountered<br> Severity: Warning<br> Message: Cannot
    modify header information - headers already sent by (output started at
    D:\xampp\htdocs\application\controllers\admin\tour_foreign.php:405)<br>
    Filename: core/Common.php<br> Line Number: 413<br> <p> A Database
    Error Occurred<br> Error Number: 1054<br> Unknown column '0' in 'field
    list'<br> INSERT INTO <code>customer_info</code> (<code>0</code>) VALUES ('22')<br>
    Filename: D:\xampp\htdocs\system\database\DB_driver.php<br> Line
    Number: 330<br></p>
  </blockquote>