Using Certain bits of the API Help

I am trying to use this API from a game modification to get information about their Server such as if it online or not and how many players are online. If I do a var_dump I get:

array(2) { [0]=> object(stdClass)#2 (7) { 
["id"]=> string(1) "1" 
["ip"]=> string(20) "" 
["port"]=> string(5) "15698" 
["name"]=> string(9) "Europe #1" 
["shortname"]=> string(5) "EU #1" 
["online"]=> string(1) "1" 
["players"]=> string(4) "2187" } 
[1]=> object(stdClass)#3 (7) { 
["id"]=> string(1) "3" 
["ip"]=> string(20) "" 
["port"]=> string(5) "15698" 
["name"]=> string(16) "United states #1" 
["shortname"]=> string(5) "US #1" 
["online"]=> string(1) "1" 
["players"]=> string(3) "253" }

Can anyone tell me how would I just get the Online Status on its own?


Assuming your variable is $response, it’s $response[0]->online for the first one, $response[1]->online for the second one.

So How would I present the Server status of both servers in separate divs?

Please try something first and let us know what you come up with. The answer is practically in my last post…