MongoCursor
PHP Manual

MongoCursor::getNext

(PECL mongo >=0.9.0)

MongoCursor::getNextReturn the next object to which this cursor points, and advance the cursor

Description

public array MongoCursor::getNext ( void )

This equivalent to calling MongoCursor::next(), then MongoCursor::current().

Parameters

This function has no parameters.

Return Values

Returns the next object.

Errors/Exceptions

Throws MongoConnectionException if it cannot reach the database.


MongoCursor
PHP Manual