Dear friends first of all I paste my code then I will describe my issue. Please help.
VIEW

```
<?php echo form_open('my_index'); ?>
<label>Person1 </label><input type="text" name="input[]"><br><br>
<label>Person2 </label><input type="text" name="input[]"><br><br>
<label>Person3 </label><input type="text" name="input[]"><br><br>
<label>Person4 </label><input type="text" name="input[]"><br><br>
<button type="submit">Test</button>
<?php echo form_close(); ?>

```

CONTROLLER

```
     public function my_index()
{
    $this->load->model('search/searchmodel');
    $r=$this->input->post('input');

    $this->searchmodel->myinsert($r);
}

```

MODEL

```
   public function myinsert($s){
$i=0;
foreach($s as $r){

    $this->db->insert('customer_order',array('customerName' => $r[$i]));
$i++;
}

}

```

My issue is as I run the code and enter data in the text-box as following: Person1= Jhon; Person2= Phillip; Person2= Mark; Person4= Jack. 
It gets inserted (in four rows, what I want) but in the following way:
J, h, r, k . While I want to insert it as Jhon, Phillip, Mark, Jack (in four rows).

I don't know what is the mistake. Please someone help me. Thanks.