jquery ajax array response handling

Prettesweaddyw

New Member
How to handle a array response from .getjson. Following code handles ajax request. \[code\]function getinfo() { $query="select field_uname_value,field_uaddress_value,field_uphone_value from {content_type_udetails}"; $result= db_query($query); $i=0; while($item = db_fetch_object($result)) { $info[$i++]=array($item->field_uname_value,$item->field_uaddress_value,$item->field_uphone_value); } print_r($info); }\[/code\]and returns array as follows\[code\]Array( [0] => Array ( [0] => bharath [1] => 12th street ,ram nagar [2] => 213124442 ) [1] => Array ( [0] => Christina [1] => 77,five corner [2] => 76874323 ) [2] => Array ( [0] => Ranjan [1] => queen towers, 4th layout [2] => 45745747 ))\[/code\]but following ajax handling not works. how to get the array response \[code\] $.getJSON('/knpgetuserinfo.json&timestamp'+new Date().getTime(), function(data) { alert(data[0][0]); }\[/code\]
 
Back
Top