Repeating Templates
| From: | Jordan Elver | Date: | Mon, 24 Feb 2003 16:10:30 +0000 |
| Subject: | Repeating Templates | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-136926@lists.php.net to get a copy of this message | ||
Hi,
I checked the archives for this but couldn't find a simple answer.
I'm working on my own templating class. Mainly as a learning experience, but
also because I only want something really simple.
I sort of know how to do simple variable substitution. I have something along
the lines of this below.
$name = 'Bob';
$page = new Template;
$page->assign('NAME', $name);
$page->display();
Which assigns the variable to a template variable like {NAME}.
So, that's fine. What I don't know how to do is repeat bits of templates. Say,
from a db query or something. How can I repeat the rows for all the data?
Any tutorials or advice would be appreciated. Hope my question is clear :)
TIA,
Jordan
--
Jordan Elver