fork download
  1. <?php
  2.  
  3. $json = <<<EOD
  4. {
  5. "items": [{
  6. "tag": "#Q8PC0JP8",
  7. "name": "UNIÃO LENDÁRIA",
  8. "type": "open",
  9. "location": {
  10. "id": 32000038,
  11. "name": "Brazil",
  12. "isCountry": true,
  13. "countryCode": "BR"
  14. },
  15. "badgeUrls": {
  16. "small": "https://a...content-available-to-author-only...s.com/badges/70/E75PzYKp5iqzLoCBSKfmURN757zafvXZUL29KhLSFs0.png",
  17. "large": "https://a...content-available-to-author-only...s.com/badges/512/E75PzYKp5iqzLoCBSKfmURN757zafvXZUL29KhLSFs0.png",
  18. "medium": "https://a...content-available-to-author-only...s.com/badges/200/E75PzYKp5iqzLoCBSKfmURN757zafvXZUL29KhLSFs0.png"
  19. },
  20. "clanLevel": 1,
  21. "clanPoints": 414,
  22. "requiredTrophies": 200,
  23. "warFrequency": "always",
  24. "warWinStreak": 0,
  25. "warWins": 1,
  26. "warTies": 0,
  27. "warLosses": 2,
  28. "isWarLogPublic": true,
  29. "members": 1
  30. }]
  31. }
  32. EOD;
  33.  
  34. $info = json_decode($json, true);
  35.  
  36. echo $info['items'][0]['name'];
  37.  
  38.  
Success #stdin #stdout 0.01s 52488KB
stdin
Standard input is empty
stdout
UNIÃO LENDÁRIA