Find cities with more than 12 million inhabitants.

<?php
$m 
= new MongoClient;
$c $m->demo->cities;

$r $c->find(
  
// query
  
'population' => [ '$gte' => 12000000 ] ],
  
// projection
  
'name' => 1'population' => 1'_id' => ]
);

foreach( 
$r as $res )
{
    echo 
$res['name'], ': '$res['population'], "\n";
}
Output