<?php
$m = new Mongo; $c = $m->selectCollection( 'demo', 'test' ); $c->drop();
$doc1 = new stdClass;
$doc1->foo = 'bar';
$doc2 = array( 'foo' => 'bar' );
$c->insert( $doc1 ); $c->insert( $doc2 );
foreach( $c->find( array( 'foo' => 'bar' ), array( '_id' => 0 ) ) as $result )
{
var_dump( $result );
}