|
MongoDB::getCollectionNamesGets an array of names for all collections in this database Description
public array MongoDB::getCollectionNames
([ array
$options = array()
] )Gets a list of all collections in the database and returns their names as an array of strings.
Parameters
Return ValuesReturns the collection names as an array of strings. Errors/ExceptionsFor MongoDB 2.6 and earlier, MongoException will be thrown if a non-string value was specified for the "filter" option's "name" criteria. Changelog
ExamplesExample #1 MongoDB::getCollectionNames example
<?php The above example will output something similar to: ... Found collection: img Found collection: beer Found collection: collation ... See Also
|