Home > Backend Development > PHP Tutorial > jQuery和PHP的JSON交互,如何避免二维数组

jQuery和PHP的JSON交互,如何避免二维数组

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:35:34
Original
1104 people have browsed it

jQuery和PHP的JSON交互,如何处理二维数组?
从浏览器端的jqGrid中取得的数据是一个二维数组,如何传到服务器端,再用PHP处理?

------解决方案--------------------
php端用json_decode解码即可
------解决方案--------------------

转换成json串,post到服务器,再用 json_decode解码成数组
------解决方案--------------------
jquery.json 插件.

把jqGrid 数组处理成 json 串后.

发送到服务器

服务器接收(注意可能引号会转义)后, json_decode 即可. 加上 第二个参数.可以把数据强制转化为 PHP 数组.
------解决方案--------------------

探讨
从浏览器端的jqGrid中取得的数据是一个二维数组,如何传到服务器端,再用PHP处理?
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Backslash present in Json
From 1970-01-01 08:00:00
0
0
0
Get: Transfer JSON data
From 1970-01-01 08:00:00
0
0
0
mysql storage json error
From 1970-01-01 08:00:00
0
0
0
javascript - Problems with displaying json data
From 1970-01-01 08:00:00
0
0
0
Find matching integers in JSON.
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template