What I received XML response is :
<?xml version="1.0" encoding="utf-8"?>
<response status="200">
<invoice_id>829584</invoice_id>
</response>
I want "invoice_id" from above data. So anyone please help for the same. Thanks.
What I received XML response is :
<?xml version="1.0" encoding="utf-8"?>
<response status="200">
<invoice_id>829584</invoice_id>
</response>
I want "invoice_id" from above data. So anyone please help for the same. Thanks.
try it with:
$xml = '<?xml version="1.0" encoding="utf-8"?>
<response status="200">
<invoice_id>829584</invoice_id>
</response>';
$xmldom = simplexml_load_string($xml);
echo $xmldom->invoice_id->__toString();
for more detail have a look at Php simple load xml