What are the alternatives to mysql_list_tables() in PHP for retrieving table information?
The mysql_list_tables() function is deprecated in PHP and should not be used for retrieving table information. Instead, you can use the mysqli extension or PDO to interact with MySQL databases and retrieve table information.
// Using MySQLi extension
$mysqli = new mysqli("localhost", "username", "password", "database_name");
$result = $mysqli->query("SHOW TABLES");
while($row = $result->fetch_row()) {
echo $row[0] . "<br>";
}
$mysqli->close();
```
```php
// Using PDO
$pdo = new PDO("mysql:host=localhost;dbname=database_name", "username", "password");
$result = $pdo->query("SHOW TABLES");
while($row = $result->fetch(PDO::FETCH_NUM)) {
echo $row[0] . "<br>";
}
$pdo = null;