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
json_encode is definitely the way to go. jQuery even has built-in support for parsing JSON. You could use e.g.
$.ajax({
url: "",
type: 'POST',
data: form_data,
dataType: 'json', // will automatically convert array to JavaScript
success: function(array) {
alert(array[0]); // alerts first string
}
});