NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP to ajax variable passing problem

Cliff Hirsch cliff at pinestream.com
Thu Aug 9 15:24:33 EDT 2007


My Ajax response handler uses this line, which is fairly typical:

var output = req.responseText;

>From php, I¹m echoing back json. Example: {"status":1,"count":0,"data":""}

But instead of var output being an object, it is a string:
³{"status":1,"count":0,"data":""}²

How do I make this an object?

Cliff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070809/bd5f242e/attachment.html>


More information about the talk mailing list