I have some PHP code that calls, then receives a response from an API (using file_get_contents()
), the API responses with a XML format like so:
<?xml version="1.0"?>
<root><status>success</status>
<duration>5 seconds</duration>
<average>13692.4</average></root>
so for example in PHP how would i take this XML response and get (for lets say) the value of <average>
? Any help would be greatly appreciated :)