Way BB works:
Thread.php - The page that holds the scripts for the threads. calls thread.htm
Thread.htm - holds the basic structure of the page and calls thread_postbit
thread_postbit.htm - holds the where the post count and avatars go. called from thread.htm
rpgenergy - the page I'm trying to call and repeat from threadpost_bit
eval ("\$rpgenergyb = \"".gettemplate("rpgenergy")."\";");
As you can see each page is calling each other:
Thread.php
-|___>thread.htm
--|>thread_postbit
---|____>rpgenergy
that's what I have in my Burning Board forum. Basically what the php code does is set a variable ($rpgenergyb) to the contents of a html file.
The html file contains this:
<img src="images/rpg/heart1.gif">
I believe the eval function treats what ever is inside as it's own php document or something like that. Well what I want to do is reapeat that image a certain ammount of times based on a number returned from a database.
Say the number is 3, so I'd want to show the image three times right? well only thread.php can have functions like the for and while loop, yet I can't seem how to repeat the image, either setting it as a variable or by doing the loop in the htm file (it returns straight text if i do the loop in anyother file except threa.php) anyone able to help? (idea: would $variable = evalfor loop in here) work?)