I am trying to use javascript to call a php script which then will return multiple variables back to my javascript so I can manipulate them.
This is my JS.
Use a simply string and explode(split) it further in ajax response. Here is PHP code
Now split(explode) the response with JavaScript
$.ajax({ url: 'test.php', data: { id : lastFileId }, success: function(output) { var my_arr = output.split("|"); console.log(my_arr[0] + "" + my_arr[1]); } });