<?php $market_hash_name = 'AK-47 | Aquamarine Revenge (Battle-Scarred)'; $json = '{ "status" : "success", "prices" : [ { "market_hash_name" : "AK-47 | Aquamarine Revenge (Battle-Scarred)", "price" : "15", "created_at" : 1460708937 }, { "market_hash_name" : "AK-47 | Aquamarine Revenge (Factory New)", "price" : "41.4", "created_at" : 1460708934 } ] }'; $arr = json_decode($json, true); foreach($arr['prices'] as $key => $val){ if($val['market_hash_name'] == $market_hash_name){ echo $val['price']; } }
You have javascript disabled. You will not be able to edit any code.