我从 steam 获取数据,这就是我得到的输出{"success":true,"lowest_price":"$0.82","volume":"17,485","median_price":"$0.82"}所以我想将数据存入mysql数据库,并且使用lowest_price和medain_price我可以这样做$filename_median_price = "https://steamcommunity.com/market/priceoverview/?appid=730¤cy=1&market_hash_name=Operation%20Breakout%20Weapon%20Case"; $data_median_price = file_get_contents($filename_median_price); $array_median_price = json_decode($data_median_price, true); $median_price1 = $array_median_price["median_price"]; $median_price = strtr("$median_price1","$"," ");然后更新到数据库中。但对于卷,我不能,因为有一个逗号而不是点,并且在数据库中它只将我更新为 17 而不是 17485。那么我如何删除逗号以便我可以正确更新数据。
- 1 回答
- 0 关注
- 91 浏览
添加回答
举报
0/150
提交
取消