On 20 Ago, 09:35, Giovanni Battista Lenoci <[EMAIL PROTECTED]> wrote:
> For example, if you do an ajax request to a page.php that do a query to
> the db, and return the data, you'll user the function json_encode (php5,
> or PEAR on php4) to write the response for javascript.

if you cannot use that function (older version of PHP, or no modules
installed), you can simply write (echo) the json output.
like:

echo "user = { 'firstName': 'John', /* and so on... */";

and jQuery will still get the data correctly

Reply via email to