I want to show the table names on my website. At the moment there are two tables stored in my Database.
$sql = "SHOW TABLES";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
echo $row;
}
}
$conn->close();
The output is: ArrayArray
What do I have to do to get the names of the tables?
Aucun commentaire:
Enregistrer un commentaire