![]() |
Loops in templates
I have to make a custom page which queries a database and gets say n rows.
I store the rows in an array. Now, i have to display the contents of each row, one line for one row. For this, i need to have a for loop in the template. How do i do this? I hope my question is clear..... |
You can't have a loop. What you need is a second template just containing the code required for the row and then call that template in the first template.
|
How exactly?
Look at the following code Code:
eval('print_output("' . fetch_template('template1') . '");'); Code:
$stylevar[htmldoctype] Code:
<option name="$name">$name</option> Code:
</select></td></tr></table> Do i have to use $template_row in template1 ?? Please help! Stuck at this thing for the last 2 days |
he needs a foreach command i think.
|
All times are GMT. The time now is 10:06 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|