I am using Last.fm get event by venue API call. It returns an XML with multiple objects
print_r($xml)
This is the result
SimpleXMLElement Object
(
[events] => SimpleXMLElement Object
(
[event] => Array
(
[0] => SimpleXMLElement Object
(
....
)
[1] => SimpleXMLElement Object
(
....
)
....
)
)
)
SimpleXMLElement Object
(
.............
.............
)
I can apply foreach loop like this
foreach($xml->events->event as $data) {
...
}
But it returns only data from first object. How can I get or loop data from other objects?