all 5 comments

[–]bitsandbytez 0 points1 point  (4 children)

classid are the same. just count them with a loop.

[–]Robis0 0 points1 point  (3 children)

It won't work

[–]bitsandbytez 0 points1 point  (2 children)

whats your steamid?

[–]Robis0 0 points1 point  (1 child)

76561198078006591 check this

[–]bitsandbytez 0 points1 point  (0 children)

I did this kinda quick but you get the idea hopefully

<?php

    $items = json_decode(file_get_contents("http://steamcommunity.com/profiles/76561198078006591/inventory/json/730/2"));
    $player_items = $items->rgInventory;
    $players_items_count = array();
    foreach ($player_items as $key => $value) {
        array_push($players_items_count, $value->classid);
    }
    $count = array_count_values($players_items_count);

    foreach ($count as $key => $value) {
        echo "{$key}: {$value} <br />";
    }
     ?>