i have used ajax in the code which works perfectly and give me json or array which ever i want as an output. the code i have used is,
xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET","http://map_ajax_control.php",false);
xmlhttp.send();
var test = xmlhttp.responseText;
alert(test);
This test variable gives me json/array.
I want to get the data which i received in the test variable in the JavaScript array.
newxt question i, how can i decode json data in javascript array? i have used the code as,
var output = new Array();
output = json_decode(xmlhttp.responseText);
but this code is not giving me any output.
How can i do this two things?