我想從php變量設置HTML下拉菜單。我給你我的代碼,所以你可以看到我想要做的:從PHP變量設置HTML下拉選項
<?php
$html_table = '
<table border="0" cellspacing="0" cellpadding="0"><tr>';
while($arr = pg_fetch_array($result1))
{
$html_table .= "<tr><td> $arr[0] </td></tr>";
}
$html_table .='</tr>';
?>
<p>
<select name="db" size="1">
<option> $html_table </option> #### <- that is my question, how to get that working
</select>
</p>
我希望你明白我想做什麼。如果你知道更好的方法,讓我知道。 乾杯
你不能把一個表中的'