Oreamnos
05-30-2005, 12:26 AM
I am writing some of my own pages and have a simple question regarding the interaction of the script and the templates.
i have this on test.php
// Get some really valuable highly sought after information
$sql = $DB_site->query("
SELECT * FROM " . TABLE_PREFIX . "table_name"
);
while ($row = $DB_site->fetch_array($sql)) {
eval('$not_sure_what_this_is .= "' . fetch_template('MY_TEMPLATE') . '";');
}
and my template is basically
<tr>
<td>$row[field1]</td>
<td>$row[field2]</td>
</tr>
so when the template is called the variables such as $row[field1] are printed to the page. But what is $not_sure_what_this_is? What does it do? Where can I use it? Is it necessary?
Thanks,
eric
i have this on test.php
// Get some really valuable highly sought after information
$sql = $DB_site->query("
SELECT * FROM " . TABLE_PREFIX . "table_name"
);
while ($row = $DB_site->fetch_array($sql)) {
eval('$not_sure_what_this_is .= "' . fetch_template('MY_TEMPLATE') . '";');
}
and my template is basically
<tr>
<td>$row[field1]</td>
<td>$row[field2]</td>
</tr>
so when the template is called the variables such as $row[field1] are printed to the page. But what is $not_sure_what_this_is? What does it do? Where can I use it? Is it necessary?
Thanks,
eric