Show available tables
This example shows how to display a list of available tables in a database.
Here is the code
<?php
$db = mysql_connect("localhost" , "username" , "password");
mysql_select_db("mysql" , $db);
$result = mysql_query("SHOW tables", $db);
while($row = mysql_fetch_row($result))
{
print("$row[0]<br>");
}
?>
This code will list all the tables in the mysql database .