//get table names and start another bullet list $tables = @mysql_list_tables($db_names[$db_num]) or die(mysql_error()); $table_list = "<ul>"; $table_num = 0;
while ($table_num < mysql_num_rows($tables)) { //get table names and make each a bullet point $table_names[$table_num] = mysql_tablename($tables, $table_num); $table_list .= "<li>$table_names[$table_num]"; $table_num++; } $table_list .= "</ul>"; $db_list .= "$table_list"; $db_num++; } $db_list .= "</ul>"; ?> <HTML> <HEAD> <TITLE>MySQL Tables</TITLE> </HEAD> <BODY> <P><strong>Databases and tables in a MySQL database</strong>:</P> <? echo "$db_list"; ?> </BODY> </HTML>