Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

insert array values in database using codeigniter

$inputdata=$this->input->post();

$phone=array($inputdata['phone']);
       
       foreach($phone as $arr)
       {
           $phoneNo=$arr;

           $f=count($phoneNo);
           
           for($i=0;$i<$f;$i++)
           {
              $arre=[
                  'phone'=>$phoneNo[$i],
                     ]; 
                  
              $insertB= $this->user_model->userdata($arre);      
           }
       }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #insert #array #values #database #codeigniter
ADD COMMENT
Topic
Name
8+1 =