JSON data word Max interfering with PHP -
i using php decode json data https://use.gameapis.net/mc/query/info/play.mineverge.net code works fine , json data fine although when try players: max: not load page.
working json code online players:
$playersonline->players->online;
not working code because max interfers php
$playersonline->players->max;
so in short max interferes php do?
you need parse json arrays passing true
second argument in json_decode
.
$json = file_get_contents("https://use.gameapis.net/mc/query/info/play.mineverge.net"); $data = json_decode($json, true); echo $data['players']['max'];
Comments
Post a Comment