I've expirienced a problem when developing for a minecraft server: I have an array like this which is received as json and encoded but for processing the output of this I need to know how to acces the array and echo one of the values for Example the Version Key.I tried to save the array as variable $json and to access it via echo $json->Version; but this results in the output of this error: Notice: Trying to get property of non-object in /home/bs-web/joomla/api/test2.php on line 12
Here´s the Array:
Array ( [0] => stdClass Object ( [GameName] => MINECRAFT [Version] => 1.8 [Plugins] => [Map] => BungeeCord_Proxy [Players] => 7 [MaxPlayers] => 100 [HostPort] => 25565 [HostIp] => 188.40.97.86 [Software] => Vanilla )
)
Aucun commentaire:
Enregistrer un commentaire