I want to show name and type but not working. How can I do taht?
$json:
{"222":{"id":"222","name":"Shirt1","type":"Men","product":"1","count":"2","price":7000},"223":{"id":"223","name":"Shirt2","type":"Men","product":"2","count":"1","price":4000},"224":{"id":"224","name":"Shirt3","product":"3","count":"2","price":14000}}
Decode:
$products = json_decode($json, true);
foreach ($products['id'] as $k => $v)
{
var_dump(array_key_exists('name', $v));
}