Jeremy,
$variable will be how you access it in the view template (ctp) file.
If you still need it in the controller you should do:
$variable = $this->Controller->read(null, $id);
// Do some work with $variable.....
$this->set(compact('variable'));
On Nov 19, 12:30 am, jburns <[email protected]> wrote:
> Once I have executed this...
>
> $this->set('variable', $this->Controller->read(null, $id));
>
> ...within the view function of a controller, how can I access the
> contents of 'variable'? I want to extract one or more field values of
> the current row. I have tried using $variable, but it is not
> recognised.
--
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=.