function updatePosition() { $positionList = $this->input->post('positionList'); $idList = $this->input->post('idList'); $jobsmethods = new Jobsmethod(); for ($i = 0; $i < count($idList); $i++) { $jobsmethods->where("id", $idList[$i]); $jobsmethods->get(); $jobsmethods->position = $positionList[$i]; $jobsmethods->save(); $jobsmethods->clear(); } redirect("admin/jobsmethods/listAll/"); }