<?php
//Attempt to connect to the default database server
$link = mysql_connect("mysql_host", "mysql_user", "mysql_password")
or die ("Could not connect");
//return result pointer containing list of table names
$list = mysql_list_tables ("database");
$i = 0;
//extract table names form the result pointer
while ($i < mysql_num_rows ($list)) {
$tb_names[$i] = mysql_tablename ($list, $i);
echo $tb_names[$i] . "<BR>";
$i++;
}
?>