<?php
$m = new MongoClient;
$c = $m->demo->continent;
$r = $c->find( [
'cities.population' => [ '$gte' => 11000000 ],
'cities.dem' => [ '$gte' => 100 ],
] );
foreach( $r as $c ) {
echo $c['name'], "\n";
foreach( $c['cities'] as $city ) {
echo '- ', $city['name'], ': ', $city['population'], ' - ', $city['dem'], "\n";
}
}
?>