I have a php file that outputs json encoded text via
echo '(' . json_encode( $final ) . ')';
And i have a javascript file that fetches that page
$.getJSON(file, function(data){
var object = eval(data);
alert(object); //for testing
...
When any browser other than firefox 3.5 visits the page that calls .getJSON it alerts null
BUT!!! If i take the text that is output by the php file paste it into a new file and load that via .getJSON it works fine. It's only when its output by php that it doesn't work.
The only difference i can see is that the PHP file's content length is 2 more than the other, i can't figure out why.
Thanks
UPDATE
I created a small array to test it with other data and it's working. There's something in my data that's causing the issue. Looking now...
a call to array_merge is the culprit.