Answer the question
In order to leave comments, you need to log in
How to read/parse xml response from api?
Hello. After a CURL request, an xml response is returned to CDEC, but the problem is that it is not displayed in the browser. print_r($result)
However, if you open the browser console, there is an answer. How to get and use it in PHP?
Answer the question
In order to leave comments, you need to log in
https://www.php.net/manual/ru/simplexml.examples-b...
if you want to view it in the browser (it's not clear why), then run the string through htmlspecialchars
<?php
echo htmlspecialchars($result);
What does "not displayed in the browser" mean? The screenshot clearly shows what is output.
It just removes the tags.
The response from the api is correct. Take it and use it. Though in PHP, even as a damn bald man
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question