How exactly?
Look at the following code
Code:
eval('print_output("' . fetch_template('template1') . '");');
$sql = $db->query_read("SELECT name FROM " . TABLE_PREFIX . "people");
while ($array = $db->fetch_array($sql))
{
$name = $array["0"];
eval('print_output("' . fetch_template('template_row') . '");');
}
eval('print_output("' . fetch_template('template2') . '");');
template 1 contains
Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - Submit Executive Summary for Mentoring</title>
</head>
<body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="2">Heading</td>
</tr>
<tr>
<td class="alt1">Name: *</td>
<td class="alt1"><select name="name">
template_row is
Code:
<option name="$name">$name</option>
template2 is
Code:
</select></td></tr></table>
$footer
This doesnt work
Do i have to use $template_row in template1 ?? Please help!
Stuck at this thing for the last 2 days