Hi, I have just started using jQuery and am trying to get data back from a mysql database in json format. I am using PHP to query the database and returning it with the json_encode method. (Basically I am following the example in the documentation - http://docs.jquery.com/Ajax/jQuery.post#urldatacallbacktype )
The problem I am having is that the example only returns one json object rather than an array of them and I'm not sure how to modify the calls to either the php encode json or how to access the data when it is returned through jquery. At the moment my php looks like this: while($row = mysql_fetch_array($result)) { echo json_encode(array("file"=>$row['name'],"byline"=> $row['byline'])); } and the jQuery: $.post("getimages.php", { location: opt_choice, curr_img: img_cnt, limit: img_lim }, function(data){ alert(data); }, "json"); How can I set it up to access multiple objects? Thanks for the help!