PDA

View Full Version : How to send array as parameter in JSON store and how it looks like in server



Jaeger
26 Oct 2010, 11:46 PM
I want to send an array as parameter in JSON store. I think it should use JSONwriter to do this, but I don't know how exactely the data looks like in the server and how parse it. Need help...

gabrielstuff
27 Oct 2010, 1:44 AM
You have to be more specific.
On the server side, you should have a BDD like mysql and a php script that will access and retrieve DATA from the BDD.

Then, at the end of you PHP script you could you the JSON class, to transform your mysql array into JSON object fully readable by you js Store.

Look here :
http://php.net/manual/fr/book.json.php
http://www.php.net/manual/fr/function.json-encode.php
http://ditio.net/2008/07/17/php-json-and-javascript-usage/
http://www.json.org/js.html

Have a nice day !