$arrData = $this->params['url'];
$this->set('value',$this->params['url']['eslPageIndex']);
pr($value);
it throws Error:
Undefined variable: value [APP/controllers/esl_controller.php, line 34]
Please
HELP ME!!!!
$arrData = $this->params['url'];
$this->set('value',$this->params['url']['eslPageIndex']);
pr($value);
it throws Error:
Undefined variable: value [APP/controllers/esl_controller.php, line 34]
Please
HELP ME!!!!
$this->set('value', ...);
means there will be a variable named $value
made available in the view. It does not set it in the controller function. Hence pr($value)
fails because there is no variable $value
there.
^^^ theres your answer! I find it is often better to do like this to avoid your issue:
$myVar = ..something...;
$myVar2 = ...some other expression... ;
$this->set(compact('myVar','myVar2');
more readable and needs only one set call! you can also then use pr() in your controllerto debug