It list databases available on a MySQL server
Example
<?php
$conn = mysql_connect(“localhost”, “root”, “password”) or die(mysql_error());
$db_list = mysql_list_dbs($conn);
$db_count = mysql_num_rows($db_list);
for($i=0;$i<$db_count;$i++){
echo mysql_db_name($db_list, $i) . “<br />”;
}
?>