$db = mysqli_connect('localhost', 'username', 'password', 'database_name'); $table = mysqli_fetch_array(mysqli_query($db, "SHOW TABLES"))[0]; echo $table; // Prints the name of the main table.
$db = pg_connect("host=localhost port=5432 dbname=database_name user=username password=password"); $table = pg_fetch_array(pg_query($db, "SELECT tablename FROM pg_tables WHERE schemaname='public'"))[0]; echo $table; // Prints the name of the main table.Package library: It is not possible to determine the package library from this function alone as it is a native function in PHP and does not depend on any external library or framework.