My PHP script is returning a JSON object that I am receiving in AJAX call.
$arr[0] = $resp;
$arr[1] = $e;
return json_encode($arr);
Now in my AJAX call , I try to get the value but all I get is "/"
or "'"
.
I am doing this in AJAX.
dd = JSON.stringify(x.responseText); //this is the response from PHP which is correct I have verified.
alert(dd[0]); //supposed to output $arr[0] but it doesn't
Am I doing something wrong here?