使用INFORMATION_SCHEMA.TABLES显示表名

I am kinda new to PHP and MySql and I am trying to find a way to echo the table names of my database in my page.

When I use : SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'myDBname' directly in PHPMyAdmin, I get the results I want but I just don't know I to "echo" it in my page.

This is what I am using at the moment :

$statement = $db->prepare("SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema =  'myDBname'");
$row = $statement->fetchAll();

What would be, in your opinion, the best way to display it on my page if I want to eventually echo the result of the query in a dropdown menu ?

This works for me.

$tables = array();
$stmt = $db->query("SHOW TABLES");
while($row = $stmt->fetch(PDO::FETCH_NUM)){
    $tables[] = $row[0];
}

var_dump($tables);