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 simply return it like that return ['num1'=>$num1,'num2' => $num2];
return ['num1'=>$num1,'num2' => $num2];
and also, you can access it as followed, respone.num1
respone.num1