<?php function showItems($steamid) { $json_link = 'http://steamcommunity.com/profiles/'.$steamid.'/inventory/json/730/2'; $items = json_decode($json, true); foreach ($items['rgDescriptions'] as $item) { $name = $item['market_hash_name']; $link = 'https://steamcommunity.com/market/listings/730/'.$name2; $img = 'http://steamcommunity-a.akamaihd.net/economy/image/'.$item['icon_url']; if($item['tradable']==1 && $item['marketable']==1) { ?> <div class="item-img" style="background-image:url('<?php $img; ?>')"> <div class="red"></div> </div> <?php } } } ?>
przykładowy json: http://pastebin.com/7HLjdpiR
chcę pobrać kolor, który jest w linijkach np. 1417 lub 1266. jak to zrobić?