Artificial intelligent assistant

MongoDB+PHPでinsert()した後に_idの値を取得する方法 UbuntuMongoDBPHP PHP $doc = array("name" => rand()); $coll->insert( $doc ); _idupdatedelete insert()_id

`_id`


$doc = array("name" => rand());
$coll->insert( $doc );
$id = $doc['_id'];

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 554aded1b3bc9b2bb01a6fb0218c0303