Tendria que ser asi o no?
<?php
mysql_connect("localhost", "xxxx", "xxx") or die(mysql_error());
mysql_select_db("vb") or die(mysql_error());
$result = mysql_query("SELECT * FROM forums")
or die(mysql_error());
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
// Print out the contents of the entry
echo '<select><option value="" selected="selected">selecionar categoría</option>
<option value="'.$row['forumid']; echo'">' .$row['title']; echo'</option></select>'
}
mysql_free_result($result);
?>
o asi?
<?php
mysql_connect("localhost", "xxxx", "xxx") or die(mysql_error());
mysql_select_db("vb") or die(mysql_error());
$result = mysql_query("SELECT * FROM forum")
or die(mysql_error());
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
printf('<select><option value="" selected="selected">selecionar categoría</option>
<option value="%s">%s</option></select>', $row[forumid], $row[title]);
}
mysql_free_result($result);
?>
de cualquiera de las dos formas me salen 2 <select>
asi: