How to deal with two-dimensional arrays when jQuery interacts with php json? The data obtained from the jqGrid on the browser side is a two-dimensional array. how can I transfer the data to the server side and use PHP for processing? ------ Solution ------------------ the php end can be decoded with json_decode ------ solution -------------------- converts the string to a json string, post it to the server, and then use json_d jQuery to interact with php json. how can we deal with two-dimensional arrays?
The data obtained from the jqGrid on the browser side is a two-dimensional array. how can I transfer the data to the server side and use PHP for processing?
------ Solution --------------------
Use json_decode to decode the php client.
------ Solution --------------------
Convert to json string, post to server, and then use json_decode to decode into array
------ Solution --------------------
Jquery. json plugin.
After processing the jqGrid array into a json string.
Send to server
After the server receives the message (note that the quotation marks may be escaped), json_decode. add the second parameter to forcibly convert the data to a PHP array.
------ Solution --------------------
Discussion
The data obtained from the jqGrid on the browser side is a two-dimensional array. how can I transfer the data to the server side and use PHP for processing?