ccherry17 Posted February 21, 2012 Share Posted February 21, 2012 Hello to all Can someone help me on how can i parse this XML string? <?php <?xml version="1.0" encoding="UTF-8"?><SendSMSResponse><Transaction><IP>120.28.199.73</IP><Code>1</Code><Description>Transaction OK</Description></Transaction><Destinations><Destination><Number> +639217195804 </Number><Code>1</Code></Destination></Destinations></SendSMSResponse> ?> I would like to get the word "Transaction OK" but i dont know where to start. thanks in advance Link to comment https://forums.phpfreaks.com/topic/257483-need-help-on-xml-parsing/ Share on other sites More sharing options...
requinix Posted February 21, 2012 Share Posted February 21, 2012 i dont know where to start. SimpleXML $xml = new SimpleXMLElement($string, 0, false); echo (string)$xml->Transaction->Description; Link to comment https://forums.phpfreaks.com/topic/257483-need-help-on-xml-parsing/#findComment-1319736 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.