Have you tried:

foreach ($user['Place'] as $place);
<?php echo $place['name']; ?>

what are your model associations like?

On Jan 23, 2:43 am, mcphisto <[EMAIL PROTECTED]> wrote:
> maybe this is a stupid question, but I don't understand a thing.
> I've a table of users (columns: id, name), one of places (columns: id,
> name) and these two tables are linked by a table called relations.
> In table relation I've three columns: id, user_id and place_id.
> Well, when I'm in the view of one of the users, i can see the id of
> the place, while I need the name.
> in my view I've something like
>
> foreach ($user['Relation'] as $relation);
> <?php echo $relation['id']; ?>
>
> how can I get the name of the users and the places instead of ID?
> Should I modify the users_controller?
>
> Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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