I'm grabbing some json data from a URL like this one: https://steamcommunity.com/id/itemdepot3/inventory/json/730/2
$json = json_decode(file_get_contents(
"https://steamcommunity.com/id/itemdepot3/inventory/json/730/2"),true);
I'm then trying to print the names of each item:
foreach($json["rgInventory"] as $item){
$cid = $item["classid"];
$iid = $item["instanceid"];
$name = $json["rgDescriptions"]["{$cid}_{$iid}"]["market_name"];
echo $name;
}
But the names which should include a ™ come out mangled like this:
StatTrakâ„¢ Five-SeveN | Nightshade (Field-Tested)
I've tried a bunch of goofy regex fixes (as this is the only character I need to fix) but to no avail. I have no idea what kind of encoding I'm dealing with here and all my searches have come up dry. How can I get my ™ symbols to print correctly?