Parsing javascript arrays in PHP

前端 未结 4 2008
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-05 05:47

I can\'t seem to figure out how to get a JS array into PHP.

What I have to work with looks like this:

var arrLow = [
{
\"e\": \"495864\",
\"rank\": \         


        
4条回答
  •  粉色の甜心
    2021-01-05 06:41

    According to the JSONLint validator this is valid JSON (without the var arrLow =). So any good json_decode() implementation should do the trick. Maybe the implementation you are using has certain limitations? The JSON.org website has a neat list of links to implementations of json_decode in PHP (and lots of other languages too). You can be sure to find one that does work.

提交回复
热议问题