Advances the cursor to the next result

# MongoDB\Driver\Cursor::next

(mongodb >=1.9.0)

MongoDB\Driver\Cursor::next — Advances the cursor to the next result

### Description

public MongoDB\Driver\Cursor::next(): void

### Parameters

This function has no parameters.

### Return Values

Moves the current position to the next element in the cursor.

### Errors/Exceptions

- Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors.
- Throws MongoDB\Driver\Exception\ConnectionException if connection to the server fails (for reasons other than authentication).
- Throws MongoDB\Driver\Exception\AuthenticationException if authentication is needed and fails.

### See Also

- Iterator::next() - Move forward to next element

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open