Answer the question
In order to leave comments, you need to log in
How to extract value from json?
I have a json like this:
{"success":true,"inventory":{"5308188287":{"id":"5308188287","classid":"1483678044"},"5308188011":{"id":"5308188011","classid":"720640649"},"5308154952":{"id":"5308154952","classid":"311939473"}}}
$json_decoded = json_decode($page);
foreach ($json_decoded->inventory as $item)
{
if ($item->id == 5308188287)
....
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question