Hi Chaps, I'm trying to get a list of MySQL table names in a PHP/HTML Select List/Menu with the value of the Select Option being the table name. I have this as a starting point, but can't figure out how to get the values into the Select. $result = mysql_query("SHOW TABLES FROM 'DATABASE'"); while($table = mysql_fetch_array($result)) { $tables[]=$table; } PHP: Any help would be sweet. .
Thats just adding HTML to what you have really echo "<select name='tables'>"; $sql = "SHOW TABLES FROM dbname"; $result = mysql_query($sql); while ($row = mysql_fetch_row($result)) { echo "<option value='{$row[0]}'>{$row[0]}</option>\n"; } echo "</select>"; PHP: