I want to return an array structure using simple XML. Everything fine, except when the XML has a tag with the same name as a PHP variable, like return
.
Example:
$msg = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);
Return
$msg->dynamics->details->flight->return-leg->airport;
How can I parse the return tag? I've tried something like {return-leg}
but I get still error.
Any idea?