Hi,
my solution would be:
create a new template with the content:
Code: Select all
<tr>
<td>
[:label:] - [:desc:] - [:price:]</br>
</td>
</tr>
That's would be
one row in the table.
Your old template would looks like:
Code: Select all
<head><title>[:title:]</title></head>
<body>
<h1>[:heading:]</h1>
<table>
<!-- part that will be looped starts -->
[:table_content:]
<!-- looped part ends -->
</table>
</body>
</html>
In PHP you read the template for the table row, you loop through your database and creates the correct table_content data.
Another way would be to mark it as a table/loop for database:
Code: Select all
<head><title>[:title:]</title></head>
<body>
<h1>[:heading:]</h1>
<table>
<!-- part that will be looped starts -->
{begin_loop_table}
<tr>
<td>
[:label:] - [:desc:] - [:price:]</br>
</td>
</tr>
{end_loop_table}
<!-- looped part ends -->
</table>
</body>
</html>
Your template engine have to get the code between {begin_loop_table} and {end_loop_table} and have to use it as a template for the rows of your table.