我试图在以下代码的下拉列表中显示价格,但它显示的是产品名称而不是价格:
<?php
//-----------------------PROCESSOR---------------------------
$query="SELECT product_name, price FROM processor";
$result = mysql_query($query);
$options="";
echo "<select name='processor' value=''>
<option>Please Select A Processor</option>";
while($nt=mysql_fetch_array($result))
{
echo "<option value='".$nt['price']."'>".$nt['product_name']."</option>";
}
echo "</select>";
?>
谁能帮助我做错了什么?
提前致谢!