[jQuery] Re: ParseJSON from array php to array javascript

2007-06-09 Thread cheridav
Hi Emil thanks for your message, i was getting crazy last 2 days, i was using file json.js that i renamed to jsonjscript.js from www.json.org , cos i have json.js from jquery.com. I getting erros cos they are not compatible. I just needed to use json.js from jquery. and the right syntaxis: $.p

[jQuery] Re: ParseJSON from array php to array javascript

2007-06-09 Thread Emil Ivanov
A little correction: > Then in javascript: > var jsArray = $.getJSON('/test.php'); Has to be Then in javascript: $.getJSON('/test.php', function (jsArray) { }); On Jun 9, 7:32 pm, Emil Ivanov <[EMAIL PROTECTED]> wrote: > Once you encode the array to JSON in php you just have to pass it to > the

[jQuery] Re: ParseJSON from array php to array javascript

2007-06-09 Thread Emil Ivanov
Once you encode the array to JSON in php you just have to pass it to the javascript, not decode it: // test.php $aCambios = mysql_fetch_all ($resultCamb ) ; $myjson = $json->encode($aCambios); // echo "