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