多维JavaScript数组到PHP数组

2 javascript php arrays multidimensional-array

我一直试图解决这个问题.我在JavaScript中有一个多维数组,有12列宽和未知数量的行,就像这样

/*
[
    [userID (int), name, username, email, password, other 1, other 2, other 3, other 4, other 5, other 6, admin(int)],
    [userID (int), name, username, email, password, other 1, other 2, other 3, other 4, other 5, other 6, admin(int)],
    [userID (int), name, username, email, password, other 1, other 2, other 3, other 4, other 5, other 6, admin(int)],
    ...
]
*/
Run Code Online (Sandbox Code Playgroud)

除了(int)之外,所有值都是字符串.这是我网站的实时用户编辑页面.我现在已经制作了JavaScript数组,所以当按下"提交"按钮时,它将像这样格式化的数组转换为PHP数组并将其保存为变量.我可以得到一些帮助吗?

Gor*_*don 6

编码为JSON,通过Ajax常规Form 发布到PHP,并使用json_decode在服务器端解码