php - my code please help syntax error, unexpected '=>' (T_DOUBLE_ARROW) -


this question has answer here:

my code please have tried several times , error in

        $data =('nidn' => $this->input->post('nidn', true));                 $pswd=('pswd' => $this->input->post('pswd', true))   `       public function cek_login() {         $data =('nidn' => $this->input->post('nidn', true));                 $pswd=('pswd' => $this->input->post('pswd', true));         $this->load->model('level_user'); // load model_user         $hasil = $this->level_user->cek_user($data,$pswd);      ` 

if assigning variable array, should add text array before brackets:

$data = array('nidn' => $this->input->post('nidn', true)); 

or,

$data = ['nidn' => $this->input->post('nidn', true)]; 

Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -