title: Get array in object xml (simplexml_load_string)
body: <p>I have a <code>$xml</code> looks like this</p>
  
  <pre><code>SimpleXMLElement Object
  (
      [@attributes] =&gt; Array
          (
              [Total] =&gt; 450
              [Count] =&gt; 4
              [Start] =&gt; 0
          )
  
      [Code] =&gt; 0
      [Item] =&gt; Array
          (
              [0] =&gt; SimpleXMLElement Object
                  (
                      [Person.P_Id] =&gt; 14845
                  )
  
              [1] =&gt; SimpleXMLElement Object
                  (
                      [Person.P_Id] =&gt; 14844
                  )
  
              [2] =&gt; SimpleXMLElement Object
                  (
                      [Person.P_Id] =&gt; 14837
                  )
  
              [3] =&gt; SimpleXMLElement Object
                  (
                      [Person.P_Id] =&gt; 14836
                  )
  
          )
  )
  </code></pre>
  
  <p>Now I want to get the array <code>Item</code> to merge with another array, but when I try <code>$xml-&gt;Item</code>, I only get the first element of this array (which is <code>14845</code>). When I use <code>count($xml-&gt;Item)</code>, it returns the true value (which is 4). Did I do something wrong to get the whole array <code>Item</code>?</p>