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.
You can go for Json in PHP and javascript if you want array in response for a ajax request
$fileId,"num1"=>1,"num2"=>2)); ?>
jQuery.ajax({ type: "GET", url: 'test.php', dataType: "json", success: function(response) { console.log(response); alert(response.num1); } });