Apologies if this explanation isn\'t clear, it\'s hard for me to understand too. How can I use PHP & Ajax to send an array to Javascript? I\'m using Aja
return the json itself and then construct the array in js by looping over the json as follows:
var array=[];
for(var key in json)
{
if(json.hasOwnProperty(key))
array.push(json[key]);
}
Or you can simply work with the json itself any reason for needing the array?
something like json[0] or json[1] etc.