0
 foreach($this->input->post('option') as $key => $val and $this->input->post('option_hindi') as $key => $val_hindi){


     if($this->input->post('score')==$key){
         $score=1;
     }else{
         $score=0;
     }


$userdata=array(
 'q_option'=>$val,
 'q_option_hindi'=>$val_hindi,
 'qid'=>$qid,
 'score'=>$score,
 );
 $this->db->insert('savsoft_options',$userdata);     

 }

I want to combine these two arrays option and option_hindi and insert them in db

0 Answers0