title: MongoDB Cannot successfully extract "column" names from cursor/array
body: <p>So, I'm trying to grab the names of the <s>columns</s> properties in my MongoDB <s>project</s> documents. I can't seem to find the method I need to relay the names back to me. Any help/advice is appreciated.</p>
  
  <p><strong>My Code:</strong></p>
  
  <pre><code>$cursor = $collection-&gt;find( $query );
  foreach ($cursor as $obj) {
  print_r ($obj);
  echo $obj;
  }
  </code></pre>
  
  <p><strong>print_r Returns:</strong></p>
  
  <pre><code>Array ( [Favorite] =&gt; 1171 [Desc] =&gt; EGG [Name] =&gt; MyThing )
  </code></pre>
  
  <p><strong>Echo Returns:</strong></p>
  
  <pre><code>Array
  </code></pre>
  
  <p>I want to be able to extract "Favorite", "Desc" and "Name" but, anytime I go after those fields, I get the value instead.</p>