how to use JSON.stringify and json_decode() properly

后端 未结 7 1673
野性不改
野性不改 2020-12-08 06:08

Im trying to pass a mulitidimensional Javascript array to another page on my site by:

  • using JSON.stringify on the array

  • assigning the result

7条回答
  •  一整个雨季
    2020-12-08 07:10

    I don't how this works, but it worked.

    $post_data = json_decode(json_encode($_POST['request_key']));
    

提交回复
热议问题