I have some json data which i have posted from a from but can't process it and able to store in database, here is what data posted looks like
Array
(
[apd0] => [{"ratio":"1","size":"S","quantity":"83"},{"ratio":"2","size":"M","quantity":"166"}]
[apd1] => [{"ratio":"1","size":"S","quantity":"83"},{"ratio":"2","size":"M","quantity":"166"},{"ratio":"3","size":"N","quantity":"200"}]
)
is there any way i can change it into associative array and will i be able to classify their name.
I have already tried
$data = json_decode($your_json_string, TRUE);
print_r(json_decode('[{"ratio":"1","size":"S","quantity":"83"},{"ratio":"2","size":"M","quantity":"166"}]', TRUE));This return you associative array what is wron with that?