I am using append multi select box with some input text box also. i want save all data into table using for loop one by one. I m finished this but problem is i couldn't implode multi select box value inside of for loop. i want store each loop individual in table.It always save first record only in team(multiselectbox value) Please help me.
My controller :
public function saveprogress()
{
$project_id=$this->input->post('project_id');
$prog_date=$this->input->post('date');
$task=$this->input->post('task');
$team = $this->input->post('team');
$report=$this->input->post('report');
$numFields = count($prog_date);
$teamFields = count($team);
for ($i = 0; $i < $numFields; $i++) {
// Pack the field up in an array for ease-of-use.
$field = array(
'prog_date' => $prog_date[$i],
'task' => $task[$i],
'team' => $team[$i],
'report' => $report[$i],
'project_id' => $project_id
);
$result=$this->db->insert('progress', $field);
}
}
My table after save (i selected 2 employee but store one in team column) :