Cakephp - one variable accessible in view and controller -


i want define array can use in appcontroller , default layout. how in cakephp?

$this->set('arr', array('one', 'two'));  // accessible in controller  $this->viewvars['arr'];  // accessible in view/layout echo $arr; 

Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

c++ - How to test/verify that zero-initialization takes place -

node.js - Webpack/TypeScript Raising Errors When node_modules is Excluded -