Your data structure is not completely clear, but I presume the ticket-
loop is nested in the venue-loop because a Venue has multiple tickets.
In that case the base-node for your ticket loop should be $venue, and
not $event['Venue'].
Like this:
foreach($event['Venue'] as $venue){
foreach($venue['Ticket'] as $ticket){
echo $ticket['price'];
}
}
On Dec 5, 4:50 pm, lirc201 <[email protected]> wrote:
> I've been looking at this way too long and need a little push. I'm
> trying to display all of the available tickets for all venues that are
> part of a selected event. I have the recursion correct for my model
> call. My first foreach loop
>
> foreach $event['Venue'] as $venue
>
> this displays all of the information for each venue
>
> the next nested foreach loop is where I'm having difficulty trying to
> get correct.
>
> I've played with this foreach ($event['Venue'] as $ticket) but keep
> getting an ... undefined variable ticket ... when I try to echo
> $ticket['displayName'], however I see the results I want if I debug
> display $event['Venue'][0]['Ticket']
>
> I'm using cake 1.3.6
>
> Thanks,
> Brian
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