public function get_item($mode = NULL) { $id_item = $this->input->post('id_item'); $item = $this->item_model->get_item($id_item); if ($mode === 'json') { $this->xhr_output($item); } }