0
的字符串我有這樣的JSON(從蒸汽市場):無法讀取JSON
{"success":true,"lowest_price":"$5.79","volume":"2,932","median_price":"$5.79"}
而且我有這樣的代碼:
$urlm = 'http://steamcommunity.com/market/priceoverview/?currency=1&appid=730&market_hash_name='.$name;
$market = json_decode(file_get_contents($urlm), true);
echo $market['lowest_price'];
但是當我嘗試它,他們給我錯了:
Notice: Undefined index: lowest_price
什麼是錯?因爲我有一個相同的方法和完美的作品的其他JSON。
是用什麼語言你的代碼?編輯您的問題以添加適當的語言標籤。 – Dijkgraaf
@Dijkgraaf對不起,我是新的。所有的代碼都是用PHP編寫的。 –
'$ name'的值是什麼? –