u30->beers; //Insert two beers and show their id numbers after insertion $result = $collection->insertOne ( [ '_id' => 1, 'name' => 'Pilsener', 'brewery' => 'Propeller' ] ); echo "Inserted with Object ID '{$result->getInsertedId()}'.\n"; $result = $collection->insertOne ( [ 'name' => 'Molson', 'brewery' => 'Canadian' ] ); echo "Inserted with Object ID '{$result->getInsertedId()}'.\n"; //Note the braces in the previous line. //They are needed to activate the method. ?>