how do i convert this
<label for="category">Select Winner</label> <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>
into 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";
cause i need this php form to work inside tpl file