php8.5
Home/ Manual/ driver / cursor/ MongoDB\Driver\Cursor::key

MongoDB\Driver\Cursor::key

PHP function Edit on GitHub ✎

(mongodb >=1.9.0)

Returns the current result's index within the cursor

Description

MongoDB\Driver\Cursor::key(): int

Parameters Parameters

Return Values

The current result's numeric index within the cursor.

See Also

  • Iterator::key

Source: reference/mongodb/mongodb/driver/cursor/key.xml · from the official PHP manual (php/doc-en)