admin管理员组

文章数量:1433532

I have a variable named

var type = [];

where i do

type.push({'type' : 1});

and finally i get the following object:

[{"type":"1"},{"type":"2"},{"type":"3"},{"type":"4"}]

by doing JSON.stringify();

but how can i get the type inside PHP?

I have a variable named

var type = [];

where i do

type.push({'type' : 1});

and finally i get the following object:

[{"type":"1"},{"type":"2"},{"type":"3"},{"type":"4"}]

by doing JSON.stringify();

but how can i get the type inside PHP?

Share Improve this question asked Jul 17, 2011 at 17:27 stergoszstergosz 5,87013 gold badges65 silver badges134 bronze badges 0
Add a ment  | 

1 Answer 1

Reset to default 5

You can use json_decode

$object = json_decode($json);

本文标签: javascriptDecode and get data of JS object in PHPStack Overflow