title: foreach and simplexml
body: <p>It's my xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; 
  &lt;documentElement&gt;
      &lt;rows&gt;
          &lt;row&gt;
              &lt;column&gt;1&lt;/column&gt;
              &lt;column&gt;David&lt;/column&gt;
              &lt;column&gt;Johnson&lt;/column&gt;
          &lt;/row&gt;
          &lt;row&gt;
              &lt;column&gt;2&lt;/column&gt;
              &lt;column&gt;Jack&lt;/column&gt;
              &lt;column&gt;Nixon&lt;/column&gt;
          &lt;/row&gt;
      &lt;/rows&gt;
  &lt;/documentElement&gt;
  </code></pre>
  
  <p>I want to loop over rows and add them to an array. I passed it to <code>simplexml</code> and then loop through these objects, but couldn't do it:</p>
  
  <pre><code>$xml-&gt;rows
  $xml-&gt;rows-&gt;row
  $xml-&gt;row
  $xml-&gt;column
  </code></pre>
  
  <p>What should I do?</p>
  
  <p>Thanks.</p>