title: Filter Mongo cursor fields to desired array index with PHP
body: <p>In the process of learning to use Mongo and PHP, and got stuck with this. 
  I have a collection in Mongo with the following structure:</p>
  
  <pre><code>array(3){
  ["timehack"]=&gt;int(..),  
  ["_id"]=&gt;object..,  
  ["series"]=&gt;  
  array(3){  
      [0]=&gt;int(..),  
      [1]=&gt;int(..),  
      [2]=&gt;int(..)  
  }  
  }  
  </code></pre>
  
  <p>I am trying to query the collection so i get all of the samples with first item in "series", something like:</p>
  
  <pre><code>$cursor = $collection-&gt;find();
  $cursor-&gt;fields(array=&gt;("timehack"=&gt;true, "_id"=&gt;false, "series.0"=&gt;true));
  $arr = $cursor-&gt;getNext();
  var_dump($arr);
  </code></pre>
  
  <p>The resulting series array is empty. How can I get just the desired index? (I realize that I can get all samples in the series then filter with code, but I would like to know how to accomplish this with a query). Thanks.</p>