<?php
include "Mongo.php";

$m = new Mongo();
$c $m->selectCollection("phpt""find");
$c->drop();

$c->insert( array(
    
"foo" => "bar",
    
"a" => "b",
    
"b" => "c")
);

$cursor $c->find(array("foo"=>"bar"), array("a"=>1,"b"=>1));

while (
$cursor->hasNext()) {
    
var_dump($cursor->getNext());
}

?>