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 01 Answer
Reset to default 5You can use json_decode
$object = json_decode($json);