title: Properly parse a Mongo cursor to PHP
body: <p>When converting a MongoCursor to PHP I use this script. Which was presented here
  <a href="http://StackOverflow.com">StackOverflow</a><a href="https://stackoverflow.com/questions/3888676/how-do-i-create-a-json-feed-from-a-mongodb-collection">SO</a></p>
  
  <p>using the upper method, the structure is same but _id is  whereas using the lower script which yields the below included result. </p>
  
  <p>Unfortunately, this results in the actual object being embedded into an array with the _id from Mongo. Like this :</p>
  
  <pre><code>`4eefa79d76d6fd8b50000007 =             {
              "_id" =                 {
                  "$id" = 4eefa79d76d6fd8b50000007;
              };
              longText = "Error Description";
              nCode = dee29fd7e15ce4ab2d3f7dfa7c5d8fc44b27501ad00908771128c920ef276154;
              nStatus = Process;
              nText = "E12345";
              nVType = Type1;
              pId =                 {
                  "$id" = 4eefa79676d6fd8b50000003;
              };
              pushDate = "2011-12-20+06%3A07%3A41";
              updateFlag = 1;
          };`
  </code></pre>
  
  <p>Since I am passing this object to another service for processing the _id is not known.</p>
  
  <p>How can I convince the PHP Driver to parse the object properly?</p>