Loop in a Loop?

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
Mike343
Registered User
Posts: 3
Joined: Thu Jan 06, 2005 12:35 am

Loop in a Loop?

Post by Mike343 »

Is it possible to have a loop inside a loop? When I try it I get an error. parse error, unexpected T_VARIABLE.

<!-- BEGIN loop1 -->
some vars
<!-- BEGIN loop2 -->
some vars
<!-- END loop2 -->
some vars
<!-- END loop1 -->

Thanks
Paddy
Registered User
Posts: 26
Joined: Tue Jul 29, 2003 10:04 am
Location: Belgium
Contact:

Re: Loop in a Loop?

Post by Paddy »

I can't see why not?
The text you put there refers to the template files, whereas the error "unexpected T_VARIABLE" would be somethign to do with your php file I would think.
Roberdin
Registered User
Posts: 1546
Joined: Wed Apr 09, 2003 8:44 pm
Location: London, United Kingdom

Re: Loop in a Loop?

Post by Roberdin »

If the problem is with your template, the error will include a reference to eval'd (evaluated) code or code included from a cache/template_something.php file.

But anyway, no bug reports at this stage. = )
Rob
Mike343
Registered User
Posts: 3
Joined: Thu Jan 06, 2005 12:35 am

Re: Loop in a Loop?

Post by Mike343 »

it did give the eval error and it was at the line the 2nd loop started at.
User avatar
{o}
Registered User
Posts: 90
Joined: Wed Mar 31, 2004 1:26 pm
Contact:

Re: Loop in a Loop?

Post by {o} »

Of course it is possible. How otherwise could they make avatars gallery? Or submenu in UCP? And these are places you should check to determine how to make a loop in a loop 8)
Mike343
Registered User
Posts: 3
Joined: Thu Jan 06, 2005 12:35 am

Re: Loop in a Loop?

Post by Mike343 »

well I figured the error out it was because of an conditional, now to figure out why the send loop results are not appearing :)
Post Reply