Controller $this->data is transferred to view $this->data automatically.
On Jul 10, 3:02 pm, jeff <[email protected]> wrote: > ================================================ > > In order to access variables or results from the controller to corresponding > view page we have to use the foll: method: > > *Syntax:* > > $this->set(' variable name ', content needed or result ); > > Eg: > > $this->set('empname',$this->Payroll->Employee->find('list', array('fields' > => array('Employee.employee_name')))); > > $this->set('data', $data); > > Now on the view page the are accessed as $empname , $data resp. > > Use > > <? debug($data); ?> > > To check the values….. > > Alternatively u can follow this link > > http://book.cakephp.org/view/821/set > > ================================================ > > -- > -- > (¨`•.•´¨) I may be busy, > `•.¸(¨`•.•´¨) but I assure you, > (¨`•.•´¨)¸.•´ you are always in my heart > `•.¸.•´ > > With Lots of Love..... > > THANKS AND REGARDS > > Jeffery Jacob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
