<!--Form to make above array into dropdown-->
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel">
<html>
<head>
<title></title>
<meta http-equiv="Content-type" content="text/html;charset=utf-8" />
</head>
<body>
<?php
$f=mysql_query("show tables from emc");
?>
<form action="" method="GET">
<select name="col">
<option value="">- COLUMN NAME -</option>
<?php while($row=mysql_fetch_assoc($f)) {
foreach($row as $k =>$vv) {?>
<option name=<?='$vv'?>><?=$vv?></option>
<?php }?>
<?php }?>
</select>
<input type="SUBMIT" value="SUBMIT">
<?php ?>
</form>
</body>
</html>
我解决了我的问题,现在它工作正常。我使用 mysql_fetch_array 代替 mysql_fetch_assoc。它向我展示了两个值,但是通过使用 assoc,它向我展示了我想要的结果