Hello Readers ,
In cakephp development framework we will use $this->set() several times .
The set() method is basically use to create a variable in our view file i.e. ctp file .
If suppose we have an array $userprofile and we want to use this in our ctp file then we will use like this way.
$this->set('userprofile',$userprofile);
or we can also write in this way
$this->set('result',$userprofile);
the variable $userprofile or $result will then be available to use in the view template file for that action.
0 Comment(s)