$consulta=mysql_query("show tables");while($reg=mysql_fetch_assoc($consulta)) echo $reg['Database'].'<br />';