How to parse the variables from a xml in php -
suppose xml content url in php variable (e.g $new).
below example of xml content:
<getresult> [{"abc": "123","xyz":"234","mno":"we4r5t"}] </getresult> when parsing of xml content in php like:-
$xmlobj = simplexml_load_string($new); error_log($xmlobj->getresult); i [{"abc": "123","xyz":"234","mno":"we4r5t"}]
but want retrieve inner content tag, e.g retrieve value of abc or xyz or mno.
how can that?
[{"abc": "123","xyz":"234","mno":"we4r5t"}] that's not xml-string it's json object. should parse json_decode ! http://php.net/manual/de/function.json-decode.php
Comments
Post a Comment