I am requesting data from another website and expecting a clean json array in return.
However I am getting this instead:
<pre></pre>{"Status":"Success","Result":1}
which won't parse with json_decode();.
How do I extract the JSON array out of this data so I can parse it?
Note: I am not in control of the code I am requesting the data from.
echoed? The question is "where did those HTML tags come from?" If they came from the remote server, then you need to let the administrator know they have a bug in their API. If they are somehow being added by your code, then you know the bug is in your code.str_replace("<pre></pre>", "", $json_string);?