Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<MongoDB\Driver\Cursor::isDeadMongoDB\Driver\Cursor::next>
^MongoDB\Driver\CursorLast updated: Mon, 26 Oct 2026

MongoDB\Driver\Cursor::key

(mongodb >=1.9.0)

MongoDB\Driver\Cursor::key — Returns the current result's index within the cursor

Description

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

Parameters

This function has no parameters.

Return Values

The current result's numeric index within the cursor.

See Also


<MongoDB\Driver\Cursor::isDeadMongoDB\Driver\Cursor::next>
^MongoDB\Driver\CursorLast updated: Mon, 26 Oct 2026