MongoDB\Driver\Cursor
PHP Manual

MongoDB\Driver\Cursor::toArray

(mongodb >=0.4.0)

MongoDB\Driver\Cursor::toArrayReturns an array of all result documents for this cursor

Description

final public array MongoDB\Driver\Cursor::toArray ( void )

Parameters

This function has no parameters.

Return Values

Errors/Exceptions

Examples

Example #1 MongoDB\Driver\Cursor::toArray() example

<?php

/* ... */

?>

The above example will output something similar to:

...

See Also


MongoDB\Driver\Cursor
PHP Manual