如何在某些URL上解码JSON数组中的值?
array(8)
{
["name"]=> string(18) "Server for testing"
["map"]=> string(12) "pointlessMap"
["game"]=> string(4) "game"
["description"]=> string(12) "No desc. set"
["players"]=> int(5)
["playersmax"]=> int(100)
["password"]=> int(0
["vac"]=> int(1)
}
我试图解码玩家:
<?php
$json = file_get_contents('http://url here/index.php');
$obj = json_decode($json);
echo $obj->array[5]->players;
?>
我需要解码&#34;玩家&#34;,感谢任何帮助。