- Reference >
- MongoDB\Database Class >
- MongoDB\Database::getDatabaseName()
MongoDB\Database::getDatabaseName()
On this page
Definition
-
MongoDB\Database::getDatabaseName
Returns the name of this database.
Return Values
The name of this database as a string.
Example
The following example prints the name of a database object:
The output would then resemble: