Skip to main content
added 61 characters in body
Source Link
michi
  • 6.6k
  • 5
  • 35
  • 56

use Xpath:

$xml = simplexml_load_string($x); // assuming XML in $x echo $xml->xpath("//str[@name='status']")[0]; 

and do the same with the other value.

use Xpath:

echo $xml->xpath("//str[@name='status']")[0]; 

and do the same with the other value.

use Xpath:

$xml = simplexml_load_string($x); // assuming XML in $x echo $xml->xpath("//str[@name='status']")[0]; 

and do the same with the other value.

Source Link
michi
  • 6.6k
  • 5
  • 35
  • 56

use Xpath:

echo $xml->xpath("//str[@name='status']")[0]; 

and do the same with the other value.