[nycphp-talk] PHP to ajax variable passing problem

Dell Sala dell at
Thu Aug 9 17:08:42 EDT 2007

On Aug 9, 2007, at 3:46 PM, csnyder wrote:

> On 8/9/07, Cliff Hirsch <cliff at> wrote:
>>  As usual, figured it out minutes after my post. Answer for the  
>> group:
>>  From: var output = req.responseText;
>>  To:     var output = eval('('+req.responseText+')');
> Yes eval(), which always makes me a little queasy, even though I know
> it's relatively safe. I wonder how many years we'll be waiting for a
> true json_decode() function to make it into general circulation? provides a json decoder for javascript. I've always used  
this instead of eval. This will only parse the json subset, and will  
fail for other arbitrary javascript.

-- Dell

More information about the talk mailing list