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

Answer

Using $this->set(compact()) , we can pass multiple parameters to access into the view file.
For example,
$this->set(compact('posts','users','reports'));
Now all these variables will be available in respective view file.

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 ---