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