Is there a way I can extract XML using PHP.
What i need is everything between the <value1> tags. Is there a way i can do it?
Can I just use substr()?
Google is your friend.
The top hit is this, take a look at the built in PHP functions for parsing XML:
Looks like xml-parse-into-struct() is the function your want, there are examples there so you can figure it out.
If you have any trouble with that, let us know and we can help you more.
P.S. You could use something like substr() but it looks like it would take quite a bit more then parsing it using the XML parser that is built into PHP.
or even better use simplexml
It'll create an array from an xml file or string. This example is to get your xml as a string:
$xml = simplexml_load_string($string);
echo 'To show something you echo '. $xml->value2;
SimpleXML is a life saver
Thanks for the links