If you cannot set that up then you will need to do it the old fashioned way of printing out interim results and working from there. Some questions to figure out are:
- Is $notes actually set in the view with the relevant data? You can do a print_r of $notes before the foreach and see what comes out. If the page is live you can do the print_r within a comment block in the HTML and view source to see the results.
- Does $notes actually have an array which contains 'User' as an associative element?
- Does the 'User' associative array have elements 'firstname', 'lastname' and 'username'
- Is there some control flow above the foreach which causes the entire block of code to be skipped altogether?
Once you know the answers to these questions you can have a better idea as to what is causing the problem and potentially how to solve it.
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment