$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]"); } ?>