> Hi there, I would like to load some data into javascript array from an php
> file, how can I do it? I read through the API and find getJSON and
> getScript, but there is nothing to handling data after getting it.
The $.getJSON method passes a JavaScript object to your callback. The
object is the evaluated results of the server response. So if your
server returns this text:
['a', 'b', 'c']
you can do this:
$.getJSON(mypage.php, function(data) {
var a = data.a;
var b = data.b;
// etc
});
Hope this helps.
Mike
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/