title: Get key and value from an array of SimpleXMLElement object
body: <p>I have an array structure like this (output by <code>print_r(array)</code>):</p>
  
  <pre><code>SimpleXMLElement Object ( 
      [items] =&gt; Array ( 
          [0] =&gt; SimpleXMLElement Object ( 
              [walson] =&gt; 986 
              [john] =&gt; 01 
              [merry] =&gt; 234 ) 
          [1] =&gt; SimpleXMLElement Object ( 
              [nelson] =&gt; 987 
              [richard] =&gt; 01 
              [joan] =&gt; 345 )))
          [2] =&gt; SimpleXMLElement Object ( 
              [danny] =&gt; 989 
              [soffie] =&gt; 02 
              [roland] =&gt; 345 )))
  </code></pre>
  
  <p>How can I get output like this in PHP:</p>
  
  <pre>
  0, walson 986, john 01, merry 234
  1, nelson 987, richard 01, joan 345
  2, danny 989, soffie 02, roland 345
  </pre>