how to convert javascript array to php array

前端 未结 4 1586
轮回少年
轮回少年 2021-01-07 09:04

here is the code to convert javascript array to php array..... this is done with cookies...

function getCookie(c_name)
{
var i,x,y,ARRcookies=document.cookie         


        
4条回答
  •  一个人的身影
    2021-01-07 09:42

    Sometimes it is not possible to change server side to change output to json. I had input in the form i.e. [ ['azz2465014416', '8', '22'],['azz2465014418', '10', '22'],['azz2465014420', '12', '22'],['azz2465014422', '14', '22'] ]

    and I get php array from this input using this php code:

    you will have then in varible $c resulted output. This is not ideal solution. It will not cover every javascript array, but if you have trouble with some array, you can change it to cover your situation.

提交回复
热议问题