title: How do I convert an object to an array?
body: <pre><code>&lt;?php
     print_r($response-&gt;response-&gt;docs);
  ?&gt;
  </code></pre>
  
  <p>Outputs the following:</p>
  
  <pre><code>    Array 
  (
      [0] =&gt; Object 
              (
                  [_fields:private] =&gt; Array 
                                      (
                                          [id]=&gt;9093 
                                          [name]=&gt;zahir
                                      ) 
              Object 
              ( 
                  [_fields:private] =&gt; Array 
                                      (
                                          [id]=&gt;9094 
                                          [name]=&gt;hussain
                                      )..
              )
  )
  </code></pre>
  
  <p>How can I convert this object to an array?  I'd like to output the following:</p>
  
  <pre><code>Array
  (
      [0]=&gt;
      (
          [id]=&gt;9093 
          [name]=&gt;zahir
      ) 
      [1]=&gt;
      (
          [id]=&gt;9094 
          [name]=&gt;hussain
      )...
  )
  </code></pre>
  
  <p>Is this possible?</p>