php - my code please help syntax error, unexpected '=>' (T_DOUBLE_ARROW) -
this question has answer here:
- php parse/syntax errors; , how solve them? 11 answers
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
Post a Comment