PHP - Manual: MongoDB\Driver\CursorInterface::toArray
2025-02-27
(mongodb >=1.6.0)
MongoDB\Driver\CursorInterface::toArray — Returns an array containing all results for this cursor
Iterates the cursor and returns its results in an array. MongoDB\Driver\CursorInterface::setTypeMap() may be used to control how documents are unserialized into PHP values.
此函数没有参数。
Returns an array containing all results for this cursor.
官方地址:https://www.php.net/manual/en/mongodb-driver-cursorinterface.toarray.php