mysql_db_name(result_id, row_number)
result_id should refer to a result set produced by a call to mysql_list_dbs (see below), and will retrieve the name of the database listed on the row specified by row_number. The first row in a result set is row 0. The function name mysql_dbname may also be used, but is deprecated.