public MongoCollection MongoDB::createCollection    ( string $name   [, array $options  ] )

MongoDB::createCollectionCreates a collection


The name of the collection.


An array containing options for the collections. Each option is its own element in the options array, with the option name listed below being the key of the element. The supported options depend on the MongoDB server version and storage engine, and the driver passes any option that you give it straight to the server. A few of the supported options are, but you can find a full list in the MongoDB core docs on » createCollection:


If the collection should be a fixed size.


If the collection is fixed size, its size in bytes.


If the collection is fixed size, the maximum number of elements to store in the collection.


If capped is TRUE you can specify FALSE to disable the automatic index created on the _id field. Before MongoDB 2.2, the default value for autoIndexId was FALSE.