On Jun 15, 2:41 am, Kiza <[email protected]> wrote:
>
> Here I have I problem, because  I got error when I try to display
> data. I apologize if this is blunder question but I'm new in Cake and
> struggling to cope with this.
> What argument I have to supply to view to correctly display data.

You've set a view variable, $locations, but your loop is:

foreach($rows as $row):

And you're trying to access an undefined loop variable, $location.

Change to:

foreach($locations as $location):

Personally, I've started always using the variable $data and doing
foreach($data as $d) so I avoid this mistake. Of course, now I need to
keep$data and $this->data separate in my head.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to