I have a query where I am getting the list of databases. This is working fine, but I don't know how to execute the queries here in PDO syntax.
$link = mysql_connect('localhost', 'root', '');
$db_list = mysql_list_dbs($link);
$i = 0;
$cnt = mysql_num_rows($db_list);
while ($i < $cnt) {
echo '<a href='.$i.'>'.mysql_db_name($db_list, $i).$i.' </a><br>';
$i++;