I want to make a script search for the tables in my database.
I found that you can do that with a query "SHOW TABLES". After I implemented this and echoed the output on the browser, it doesn't show the table names as it should do. The number of tables is correct, but the output it shows is
ArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArray
12 times Array for I have 12 tables in my database.
Maybe it is in my code so here it is.
function backup_db()
{
require_once("../../Connections/chirodon_chirodb.php");
// Find all tables in the Database
$count = 0;
$fetch_Tables = $chirodon_chirodb -> query("SHOW TABLES") or die(mysql_error());
while($table = $fetch_Tables -> fetch_array()) {
$allTables[$count] = $table;
$count++;
}
foreach($allTables as $table) {
echo $table;
}
mysqli_free_result($fetch_Tables);
}
$chirodon_chirodb is my connection to the database. This can't be the problem, because I've used it several time on my website without any issue.