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 Quote 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; Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.