src/Kinnngg/Swat4query/Server.php
public static function SortPlayers($a,$b,$co,$jak) {
   if($co=="name") {
    $a2=strtolower($a['name']);
    $b2=strtolower($b['name']);
    if($a2==$b2) return 0;
    if((($jak=="+")&&($a2>$b2))||(($jak=="-")&&($a2<$b2))) return 1; else return -1;
   } else {
    if($a[$co]==$b[$co]) return 0;
    if((($jak=="+")&&($a[$co]>$b[$co]))||(($jak=="-")&&($a[$co]<$b[$co]))) return 1; else return -1;
   }
  }
public static function SortPlayers($a,$b,$co,$jak) {
   if($co=="name") {
    $a2=strtolower($a['name']);
    $b2=strtolower($b['name']);
    if($a2==$b2) return 0;
    if((($jak=="+")&&($a2>$b2))||(($jak=="-")&&($a2<$b2))) return 1; else return -1;
   } else {
    if($a[$co]==$b[$co]) return 0;
    if((($jak=="+")&&($a[$co]>$b[$co]))||(($jak=="-")&&($a[$co]<$b[$co]))) return 1; else return -1;
   }
  }
public static function SortPlayers ( $ a , $ b , $ co , $ jak ) { if ( $ co == "name" ) { $ a2 = strtolower ( $ a [ 'name' ] ) ; $ b2 = strtolower ( $ b [ 'name' ] ) ; if ( $ a2 == $ b2 ) return 0 ; if ( ( ( $ jak == "+" ) && ( $ a2 > $ b2 ) ) || ( ( $ jak == "-" ) && ( $ a2 < $ b2 ) ) ) return 1 ; else return - 1 ; } else { if ( $ a [ $ co ] == $ b [ $ co ] ) return 0 ; if ( ( ( $ jak == "+" ) && ( $ a [ $ co ] > $ b [ $ co ] ) ) || ( ( $ jak == "-" ) && ( $ a [ $ co ] < $ b [ $ co ] ) ) ) return 1 ; else return - 1 ; } }
A Helper Function
This function will sort players.

@param [type] $a   [description]
@param [type] $b   [description]
@param [type] $co  [description]
@param [type] $jak [description]
A Helper Function This function will sort players .