Using JsonEncode i got the php array in javascript. How i can get the modified array back to php.?
+1
A:
As I understood you need json_decode() function. You can easily convert array encoded in json-format to the php-array
Alex
2010-01-02 12:02:26
That is, after you have submitted it to a php script via ajax or through a form submit.
Question Mark
2010-01-02 12:05:21
A:
To get a JSON string to a PHP object:
$obj = json_decode($some_json);
echo $obj->field1; // where field1 is a known field
TO get a JSON string to an associative array:
$arr = json_decode($some_json, true);
echo $arr['field1'];
Carl
2010-01-06 23:19:14