Sorry for the brevity in the comment Your Common Sense,. Still getting used to Stackoverflow. Thank you for your reply. It has been very helpful. How about:
require_once("db_fns2025.php");
// Query to get table names
$sql = "SHOW TABLES";
$rs = mysqli_query($link, $sql);
// Check if there are tables
$tblCnt = 0;
if ($rs->num_rows > 0) {
echo "<h2>Tables in the $dbname database:</h2>";
echo "<ul>";
// Output data from each row
while ($row = $rs->fetch_array()) {
$tblCnt++;
echo "<li>" . $row[0] . "</li>";
}
echo "</ul>";
if ($tblCnt==1) {
echo "There is $tblCnt table<br />\n";
}
else if ($tblCnt>1){
echo "There are $tblCnt tables<br />\n";
}
} else {
echo "No tables found in the $dbname database.";
}
mysqli_close($link);
?>