My advice with all of these sort of issues is to debug out the results of the array you are parsing. It then becomes really easy to see what syntax you need to get to the right data:
die(debug($your_variable)); Jeremy Burns Class Outfit [email protected] http://www.classoutfit.com On 4 Jul 2010, at 18:27, Tomfox Wiranata wrote: > oki...i just embarrassed myself... > > delete ['User'] and it works^^ > > On 4 Jul., 18:58, Tomfox Wiranata <[email protected]> wrote: >> hi, >> >> i try to retrieve user data and echo it in a view. >> >> my view: >> <table> >> <tr> >> <th>name</th> >> >> </tr> >> >> <?php foreach ($users as $user): ?> >> >> <tr> >> <td><?php echo $user['User']['firstname']; ?></td> >> <<<<<<<<<<<<<<<<< line 25 !!!! >> </tr> >> <?php endforeach; ?> >> >> </table> >> >> controller: >> function profile() >> { >> $this->set('users', >> $this->User->findByUsername($this->Session->read('User.username'))); >> >> } >> >> its drivin me nuts....i dont think i did sth different from the blog >> example ?? >> >> thx so much >> >> btw: the sql-statement is correct. it returns the value i need..... > > 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 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
