Advertisement
nateshoffner

Untitled

Dec 8th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.22 KB | None | 0 0
  1. <?php
  2. $json_decoded = json_decode($raw_json, true);
  3.  
  4. $total_players = 0;
  5.  
  6. foreach ($json_decoded as $server)
  7. {
  8.     $players = $server['players_current'];
  9.  
  10.     //do other stuff here
  11.  
  12.     $total_players += $players;
  13. }
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement