title: SimpleXML/PHP - Can't access object
body: <pre><code>$tmp2 = '&lt;?xml version="1.0"?&gt;&lt;RWResponse&gt;&lt;RESPONSE&gt;&lt;DATA&gt;&lt;HEADER&gt;&lt;COLUMN&gt;interval&lt;/COLUMN&gt;&lt;COLUMN&gt;name&lt;/COLUMN&gt;&lt;/HEADER&gt;&lt;/DATA&gt;&lt;/RESPONSE&gt;&lt;/RWResponse&gt;';
  $xml = simplexml_load_string($tmp2);
  echo $xml-&gt;RESPONSE-&gt;DATA-&gt;HEADER-&gt;COLUMN[0];
  </code></pre>
  
  <p>The above won't output anything, even though a var_dump is sucessful:</p>
  
  <pre><code>object(SimpleXMLElement)#2 (1) {
    ["RESPONSE"]=&gt;
    object(SimpleXMLElement)#3 (1) {
      ["DATA"]=&gt;
      object(SimpleXMLElement)#4 (1) {
        ["HEADER"]=&gt;
        object(SimpleXMLElement)#5 (1) {
          ["COLUMN"]=&gt;
          array(2) {
            [0]=&gt;
            string(8) "interval"
            [1]=&gt;
            string(13) "creative_name"
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>Thanks</p>