-
How to convert SOAP response to PHP Array?
almost 7 years ago
-
about 5 years ago
Thank you! This code very helped me. only i not use first records (func file_get_contents), so my variant :
$result = $client->__doRequest($request,$sandbox, 'createShipmentOrder',1); // SimpleXML seems to have problems with the colon ":" in the <xxx:yyy> response tags, so take them out $xml = preg_replace("/(<\/?)(\w+):([^>]*>)/", '$1$2$3', $result); $xml = simplexml_load_string($xml); $json = json_encode($xml); $responseArray = json_decode($json,true);
-
1 Comment(s)