Sorry, I don't quite undertsand all that. But I'm talking about something like this:
Code:
$users = array(
1 => array('username' => 'Adam', 'email' => 'adam@adam.com'),
2 => array('username' => 'Ben', 'email' => 'ben@ben.com'),
3 => array('username' => 'Chris', 'email' => 'chris@chris.com')
);
foreach ($users as $user)
{
$userbits .= '<TR><TD>' . $user[username] . '</TD><TD>' . $user[email] . '</TD></TR>';
}
Then in the template:
Code:
<TABLE>
$userbits
</TABLE>
You could also use a template for each user instead of coding in the html, like:
Code:
foreach ($users as $user)
{
eval('$userbits .= "' . fetch_template('my_userbit') . '";');
}
Then you'd need a new my_userbit template something like:
Code:
<TR><TD>$user[username]</TD><TD>$user[email]</TD>
It's exactly the same except that the html is in a template.