Finding multiple documents is done with the find(), and returns an iterator in the form of a MongoCursor object.


<?php
$m 
= new MongoClient();
$c $m->demo->talks;

$cursor $c->find( [ 'talks.title' => [ '$exists' => true ] ] );

foreach ( 
$cursor as $r )
{
    echo 
$r['_id'], "\n";
}
?>
Output