Я пытаюсь добавить данные в свой массив $data с помощью следующего метода контроллера CodeIgniter. Однако я каким-то образом теряю свой элемент user из $data. Что мне следует сделать по-другому?
public function requirement()
{
$data['user'] = $this->LoginModel->getusers();
$data = array(
'role_name' => $this->input->post('role_name'),
'vacancies' => $this->input->post('vacancies'),
'experience' => $this->input->post('experience'),
'jd' => $this->input->post('jd'),
'hiring_contact_name' => $this->input->post('hiring_contact_name'),
'hiring_contact_number' => $this->input->post('hiring_contact_number'),
'user_id' => $this->input->post('user_id')
);
// when I print $data, there is no "user" element anymore
}
Подробнее здесь: https://stackoverflow.com/questions/420 ... iple-new-v
Мобильная версия