I'm trying to parse a XML file, here is the var dump of the structure:
Code:
object(SimpleXMLElement)[1]
public '@attributes' =>
array (size=1)
'version' => string '2' (length=1)
public 'currentTime' => string '2014-08-24 22:27:33' (length=19)
public 'result' =>
object(SimpleXMLElement)[2]
public 'rowset' =>
object(SimpleXMLElement)[3]
public '@attributes' =>
array (size=3)
... public 'cachedUntil' => string '2014-08-24 22:27:33' (length=19)
public 'row' =>
array (size=398)
...
There are 398 rows returned that I need to display. If I use:
PHP Code:
echo $listInfo->result->rowset->row[0]['jobID']."<br />";
It works fine, but as soon as I introduce a Foreach loop, and remove the [0] I get issues. I will either get an error saying its not an Object or I'll just get the first row returned and nothing else.