How do I display tables from a database?
问题 I'm trying to put the tables from MySQL database in a HTML page using PHP. I'm beginner in PHP and I face a problem to the mysqli_query function. This is my PHP code: // connect to the db $host = 'localhost'; $user = 'root'; $pass = ''; $db = 'testdb'; $connection = mysqli_connect($host, $user, $pass, $db) or die("cannot connect to db"); // show the tables $result = mysqli_query($connection, 'SHOW TABLES') or die ('cannot show tables'); while($tableName = mysqli_fetch_row($result)) { $table =