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