I have an XML that's coming back from an cURL post that's returning:
$output=<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<mtMessageRsp carrier="102" messageId="769f2e4f-56da-4865-988a-a9199c387a48"/>
I'm returning this as an XML via:
return simplexml_load_string($output);
$result is catching the return and it's coming back as:
$result = {
"@attributes" : {
carrier : "102",
messageId : "8d691cbe-d188-42b1-9041-387666d39c6a"
}
How can I drill down to get the messageId as plane text? When I use this:
$result['messageId']
I get:
{
"0" : "bf629ae9-c86a-486a-bfb0-704e16448ddf"
}
But I just want:
bf629ae9-c86a-486a-bfb0-704e16448ddf