how do i convert this
<select name="willwin" id="willwin">
<?php
if ($db->numrows() > 0){
while ($row = $db->fetch()) { ?>
<option value=''></option>
<option value="<?php echo $row["willwin"]; ?>"><?php echo $row["team1"]; ?></option>
<option value="<?php echo $row["willlose"]; ?>"><?php echo $row["team2"]; ?></option>
<?php
}
}
?>
</select>
<br/><br/>
<label>Tag Bettor</label>
<select name="sub_cat" id="sub_cat"></select>
to look like this
$TPL_team_list = '<select name="willwin" class="form-control">' . "\n";
while ($row = $db->fetch())
{
$TPL_team_list .= "\t" . '
<option value="' . $row[''] . '" ' . $selected . '>' . $row[''] . '</option>
<option value="' . $row['team1'] . '" ' . $selected . '>' . $row['team1'] . '</option>
<option value="' . $row['team2'] . '" ' . $selected . '>' . $row['team2'] . '</option>
' . "\n";
}
$TPL_team_list .= '</select>' . "\n";
{
$template->assign_block_vars('tag_bidder', array(
'TEAM' => $TPL_team_list,
));
$i++;
}
i cant intergrate the above form (doesnt respond when place directly) in tpl unless converted