Json Decode - PHP
问题 I'm trying decode a json from an one API, but when i try the code: <?php $json = file_get_contents("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=270EBE5B0B2501EE0FC750196325406B&steamids=76561198260508210"); $decode = json_decode($json,1); echo $decode['realname']; ?> This appears: Notice: Undefined index: realname in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CSGrow\index.php on line 26 回答1: When you inspect the API response closely, then is what the