What is the use of $this->set();

Answer

The set() method is used for creating a variable in the view file.Say for example if we write,
$this->set('posts',$posts); in controller fie, then the variable $posts will be available to use in the view template file for that action.

All cakephp Questions

Ask your interview questions on cakephp

Write Your comment or Questions if you want the answers on cakephp from cakephp Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---