insert array values in database using codeigniter

Solutions on MaxInterview for insert array values in database using codeigniter by the best coders in the world

showing results for - "insert array values in database using codeigniter"
Nesrine
25 May 2016
1$inputdata=$this->input->post();
2
3$phone=array($inputdata['phone']);
4       
5       foreach($phone as $arr)
6       {
7           $phoneNo=$arr;
8
9           $f=count($phoneNo);
10           
11           for($i=0;$i<$f;$i++)
12           {
13              $arre=[
14                  'phone'=>$phoneNo[$i],
15                     ]; 
16                  
17              $insertB= $this->user_model->userdata($arre);      
18           }
19       }
20