Re: Problem with counting records
On Jun 15, 2:41 am, Kiza <kiza2...@gmail.com> 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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home