PHP – removing unwanted XML from string

Yesterday I was working on a small PHP script in which an API sends “xml” within the response. That XML is supposed to make handling the data easier, but to be fair I just didn’t need it. This is the snippet that the API returned

At first I tried to simply use PHP’s strip_tags() […]

Scroll to top