- Reference >
- MongoDB\Collection Class >
- MongoDB\Collection::getCollectionName()
MongoDB\Collection::getCollectionName()
On this page
Definition
-
MongoDB\Collection::getCollectionName
Returns the name of this collection.
Return Values
The name of this collection as a string.
Example
The following returns the collection name for the zips
collection in the
test
database.
The output would then resemble: