Creating a document:
$db->collection->insert($content); // $newDocID = ???
I\'m trying to get the new document\'s id. How? Thanks.
$newDocument = $db->collection->findAndModify ( $row, $row, null, array('new'=>true,'upsert' => true)); $strId = $newDocument['_id']->{'$id'};
http://php.net/manual/en/mongocollection.findandmodify.php