How to parse an XML file using PHP?
- by Jack
Here I have a variable 'response' which is obtained by parsing an XML file.
$url = 'http://xxxxx.xml';
$ch = curl_init($url);
$response = curl_exec($ch);
The url structure is as follows -
<user>
<id>734</id>
<name>Peter Parker</name>
-
<status>
<favorited>false</favorited>
</status>
</user>
How to access each bit of info like id,name,favorited from response?