Menu

Realm List access

James
2013-10-29
2014-01-21
  • James

    James - 2013-10-29

    Hi All,

    Would it be possible to know how to access possibly an array list of realms?

    I've tried using $realms = $armory->getRealms(); when I use var_dump it works fine but whenever I try to access any other variables within the realms section it just keeps coming back as null

    Id like to access possible the :

    ["name"]=> or ["slug"]=> aspects

    Thanks

     
  • James

    James - 2013-11-07

    I'm assuming this place doesn't get many visits any more?

     
  • Larph

    Larph - 2014-01-21

    I think your looking for something like this:

    region); $realmdata = $realms->getData(); for ( $i = 0; $i < count($realmdata['realms']); $i++ ) { print $realmdata['realms'][$i]['slug']; print $realmdata['realms'][$i]['locale']; print $realmdata['realms'][$i]['name']; print $realmdata['realms'][$i]['type']; print $realmdata['realms'][$i]['population']; print $realmdata['realms'][$i]['battlegroup']; print $realmdata['realms'][$i]['timezone']; print $realmdata['realms'][$i]['status']; print $realmdata['realms'][$i]['wintergrasp']['status']; print $realmdata['realms'][$i]['wintergrasp']['controlling-faction']; print floor($realmdata['realms'][$i]['wintergrasp']['next']/1000); print $realmdata['realms'][$i]['tol-barad']['status']; print $realmdata['realms'][$i]['tol-barad']['controlling-faction']; } ?>

    Hope this works for you. Example: http://86.94.214.175/wow

     

    Last edit: Larph 2014-01-21

Log in to post a comment.

MongoDB Logo MongoDB