Jump to content

PageArray, how to use?


Harmster
 Share

Recommended Posts

Hey,

I have a tournament page that requires teams competing in that tournament, this can be more then 2 it can be 100+ so I thought i get a page array but how do i use it in the template?

i tried:

foreach($page->teams as $team);
{
echo $team->title;
}

But then I'd only get the last team...

how do i get this right?

Link to comment
Share on other sites

You've got an extra semicolon after the foreach. Thus the loop is empty and echo gets executed only after the last iteration.

So you were doing the right thing basically, just take the semicolon away and you're good. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...