I am using Javascript to do a GET request on a php page, but when I try to parse the php page as JSON, I get the following error:
Uncaught SyntaxError: Unexpected token <
I imagine because at the bottom of the PHP page, the following comment exists:
<!-- url here compressed/chunked Tue Sep 4 17:15:42 PDT 2012 -->
The comment in the PHP file is a HTML comment and should not be sent within a JSON response (it should only contain plain JSON)
You can either
a) remove the comment from the PHP file completely or
b) put it within a PHP section (using PHP-style comments)
I don’t think, you’ll need this information in the JSON, do you?