0

As the title says i'm using a SOAP API and i get the respones with cURL, my response is in full string so like :

When i do

echo $response

updatedtestApiapiaddUserTestapiaddUserTestapiaddUs...

When i do

var_dump($response) :

php:47:string '<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><s....

I tried various XML functions like SimpleXMLElements() etc but whenever i try it my arrays are always null or empty.

I would really like some help if anyone knows thanks

vincent.t
  • 1
  • 2
  • There are tags in XML like in HTML, if you want to display them, you have to use [`htmlspecialchars()`](https://www.php.net/manual/en/function.htmlspecialchars.php) – Cid Sep 02 '22 at 12:56
  • did you try SoapClient ? – Shozab javeed Sep 02 '22 at 12:58
  • You almost certainly don't actually want an array - PHP arrays don't really have the same "shape" as XML documents, so you end up with a lot of odd edge cases to think about. What you want is an API that lets you *retrieve the data you need*. The linked duplicates list a number of those. – IMSoP Sep 02 '22 at 13:44

0 Answers0