since im creating an array, would i then need to put the variable register inside the
while loop, or just outside just before it render.. ?
im creating the table rows with the template dbtestrow
template
dbtestrow :
Code:
<tr align="center">
<td>$userid </td><td>$username</td> <td>$usermail</td>
</tr>
and i call the eval function from the main template
part of
dbtesttemplate :
Code:
<br /><table align="center" border="1">
<tr class="blockhead"><td>Welcome to test database page</td></tr>
<tr></tr><tr></tr>
<!-- get rows -->
$dbtestdata
<!-- close table -->
</table><br />
so my new php would be something like
PHP Code:
while ($row = $vbulletin->db->fetch_array($emailresult))
{
$userid = htmlspecialchars_uni($row['userid']);
$username = htmlspecialchars_uni($row['username']);
$usermail = htmlspecialchars_uni($row['email']);
// vb3 : eval('$dbtestdata("' . fetch_template('$dbtestrow') . '");');
$dbtestdata = vb_template::create($dbtestrow);
}
$dbtestdata->register('userid', $userid);
$dbtestdata->register('username', $username);
$dbtestdata->register('usermail', $usermail);
$templater = vB_Template::create('dbtesttemplate');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
$templater->register('pagetitle', $pagetitle);
print_output($templater->render());
or did i (excuse my expression) fall of the wagon in the last cornor.