List databases – PHP

<?php

mysql_list_dbs();

Example :

$connection=mysql_connect(“localhost”,”root”,”password”);

$dataBases = mysql_list_dbs($connection);

while ($db = mysql_fetch_object($dataBases)) {

echo $db->Database . “<br />”;

}

?>

Share

Leave a Reply

Your email address will not be published. Required fields are marked *