如何使用php显示mysql数据库中的所有表名?我正在使用这种语法..任何人都可以在我错的地方指导我..提前谢谢
<?php
$db = mysqli_connect('localhost','root','','realestate');
// Check connection
if (mysqli_connect_errno($db))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
else
{
echo "Successfully connected to database.</br>";
}
$result = mysql_query("SHOW TABLES FROM 'realestate'");
while ($row = mysql_fetch_array($result))
{
echo $row[0];
}
?>