I'm currently struggling with extracting information from a SimpleXMLElement Array.
Here's the code...
Code: Select all
<pre>SimpleXMLElement Object
(
[errorcode] => 0000
[users] => SimpleXMLElement Object
(
[user] => SimpleXMLElement Object
(
[username] => ###########
[txtypes] => SimpleXMLElement Object
(
[txtype] => Array
(
[0] => SimpleXMLElement Object
(
[transactiontype] => Deferred
[currencies] => SimpleXMLElement Object
(
[currency] => SimpleXMLElement Object
(
[currencycode] => GBP
[totalnumber] => ##
[totalvalue] => £####.##
)
)
)
[1] => SimpleXMLElement Object
(
[transactiontype] => Refund
[currencies] => SimpleXMLElement Object
(
[currency] => SimpleXMLElement Object
(
[currencycode] => GBP
[totalnumber] => ##
[totalvalue] => £####.##
)
)
)
)
)
)
)
[timestamp] => 08/02/2011 08:10:33
)
</pre>Basically, I need to go through and extract the transactiontype, totalnumber and totalvalue for each occurance. Is this possible to automate?
Any Information would be greatly appreciated...
Thanks Guys!
Jay