title: Return in foreach showing only 1st value
body: <p>I have problem. In my function, return shows only first player from server. I wanted to show all players from server, but i cant get this working. Here is my code:</p>
  
  <pre><code>function players() {
      require_once "inc/SampQueryAPI.php";
      $query = new SampQueryAPI('uh1.ownserv.pl', 25052); // Zmień dane obok! //
      if($query-&gt;isOnline())
      {
          $aInformation = $query-&gt;getInfo();
          $aServerRules = $query-&gt;getRules();
          $aPlayers = $query-&gt;getDetailedPlayers();
          if(!is_array($aPlayers) || count($aPlayers) == 0)
          {
              return 'Brak graczy online';
          }
          else
          {
              foreach($aPlayers as $sValue)   
              {
                  $playerid = $sValue['playerid'];
                  $playername = htmlentities($sValue['nickname']);
                  $playerscore = $sValue['score'];
                  $playerping = $sValue['ping'];
                  return '&lt;li&gt;'.$playername.' (ID: '.$playerid.'), Punkty ('.$playerscore.'), Ping ('.$playerping.')&lt;/li&gt;';
              }
          }
      }
  }
  </code></pre>