The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
foreach/while loops in custom pages
Hello,
I've been playing around with custom pages as explained in this topic: https://vborg.vbsupport.ru/showthread.php?t=98009 Got everything working well, except i'm unsure of how to get the returned values from loops out of the actual script, into the template the script is calling, and printed into the user's browser when the page is loaded. I did it the way i would do on a normal, non-vb, non-templated script, and it only outputs the last result from the loop, instead of all of them. For example, this script in example.php PHP Code:
Then, in my template, i have this: HTML Code:
<tr> <td class="alt1">$output</td> </tr> I don't know any other way of doing it that's "compatible" with vbulletin, this is how i would do it on a plain old php script, and it would work fine. Any information or links to more in depth information about this whole subject would be much appreciated. Thanks. |
#2
|
|||
|
|||
Change:
PHP Code:
PHP Code:
(Google PHP concatenation it will probably give you a bit more info) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|