我想通过从我的桌子上获取价值来缩小面积。 这部法律似乎并不奏效;它所勾画的都是在没有内容的情况下倒台的盒子,我如何能够做到这一点? 或者在这样做时是否有替代程序?
<?
$connection = mysql_connect("localhost", "root", "");
mysql_select_db("test", $connection);
$query = "SELECT full_name FROM test";
$names = mysql_query($query);
function dropDown($content, $result)
{
while($row = mysql_fetch_row($result))
{
$name = $row[0];
$content .= "<option value= $name >$name</option>";
}
}
$content=<<<EOT
<html>
<body>
<select name="name">
EOT;
dropDown($content, $names)
$content.=<<<EOT
</select>
</body>
</html>
EOT;
echo $content;
?>