title: print certain elements of a multidimensional array
body: <p>I am creating a top-site and I have a question about echoing a certain element of a multidimensional-array. I am using a library called <a href="https://github.com/Austinb/GameQ" rel="nofollow">GameQ</a> to ping gaming servers to grab statistics of said server.  I am unable to print the results from certain elements in the array that I specify.</p>
  
  <p>My Code:</p>
  
  <pre><code>        &lt;?php
  
      // Include the main class file
      require '../GameQ.php';
  
      $gq = new GameQ();
      $gq-&gt;addServer(array(
          'id' =&gt; '0',
          'type' =&gt; 'minecraft',
          'host' =&gt; '192.210.238.76:25865',
      ));
  
      $results = $gq-&gt;requestData(); // Returns an array of results
  
  //Below line returns a error: Notice: Undefined offset: 0
      echo "Online: " . $results[0]['numplayers'] . "/" . $results[0]['maxplayers'] . "&lt;br /&gt;";
  
      var_dump($results);
  
      ?&gt;
  </code></pre>
  
  <p>Array Var dump:</p>
  
  <pre><code>        array (size=1)
    '192.210.238.76:25865' =&gt; 
      array (size=17)
        'hostname' =&gt; string 'A Whole Other Level' (length=19)
        'gametype' =&gt; string 'SMP' (length=3)
        'game_id' =&gt; string 'MINECRAFT' (length=9)
        'version' =&gt; string '1.6.4' (length=5)
        'plugins' =&gt; string 'CraftBukkit on Bukkit 1.6.4-R0.1-SNAPSHOT' (length=41)
        'map' =&gt; string 'Build' (length=5)
        'numplayers' =&gt; string '6' (length=1)
        'maxplayers' =&gt; string '30' (length=2)
        'hostport' =&gt; string '25865' (length=5)
        'hostip' =&gt; string '192.210.238.76' (length=14)
        'players' =&gt; 
          array (size=6)
            0 =&gt; 
              array (size=1)
                ...
            1 =&gt; 
              array (size=1)
                ...
            2 =&gt; 
              array (size=1)
                ...
            3 =&gt; 
              array (size=1)
                ...
            4 =&gt; 
              array (size=1)
                ...
            5 =&gt; 
              array (size=1)
                ...
        'gq_online' =&gt; boolean true
        'gq_address' =&gt; string '192.210.238.76' (length=14)
        'gq_port' =&gt; string '25865' (length=5)
        'gq_protocol' =&gt; string 'gamespy3' (length=8)
        'gq_type' =&gt; string 'minecraft' (length=9)
        'gq_transport' =&gt; string 'udp' (length=3)
  </code></pre>
  
  <p>I have reviewed the manual for array's at <a href="http://php.net/manual/en/language.types.array.php" rel="nofollow">Manual</a>.  I would appreciate anyone's help on this topic.  I know I am missing something.  I have tried to search for the answer first, before registering to ask this question.  I would think searching for the results would be faster than waiting on someone to help me with the answer.  Thank you for your patients and your understanding. Happy coding!</p>