May 10th, 2013, 02:14 PM
Join Date: Apr 2013
Time spent in forums: 4 h 19 m 29 sec
Reputation Power: 0
I want to use an AJAX query to obtain information dynamically from a PHP page. Now, I want to send information from the PHP request to my main open web page; how do I send this information (in the server side script that I call) and how should I interpret this client side?
For example, what I can do is on the PHP request have a result printed something like this (where $result is an array):
So, now I have an array printed at the php webpage in json format; now when I try to load it in the ajax function:
output = JSON.parse(result);
it doesn't give any output.Basically I would like to have an array in the php script, then return it in a way that I can send it to AJAX and then when AJAX has received it I would like to edit it in a way again so that I can use it as an array again, with the same dimensions and content as I originally had in the PHP request. Any idea how to go about this?