[Solved] Loop data from query

Your json_decode() has a second parameter which determine the return type. By default, it will parse the JSON string into stdObject, while you access it using indexes which is wrong $server = Json_Decode(File_Get_Contents(“http://query.fakaheda.eu/217.11.249.84:27408.feed”)); foreach($server->players_list as $player) { echo ‘<span class=”ipsGrid_span4″>’.$player->name.'</span>’; echo ‘<span class=”ipsGrid_span4″>’.$player->score.'</span>’; echo ‘<span class=”ipsGrid_span4″>’.$player->time.'</span>’; } To parse json string into array, use json_encode($jsonString, … Read more

[Solved] Loop data from query

Introduction Looping data from a query is a common task in programming. It is a process of iterating through a set of data and performing an action on each item in the set. This can be done in a variety of ways, depending on the language and the type of data being looped. In this … Read more