Title: [Plugin: Leaguemanager] Table sorting
Last modified: August 19, 2016

---

# [Plugin: Leaguemanager] Table sorting

 *  [garthnait](https://wordpress.org/support/users/garthnait/)
 * (@garthnait)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-leaguemanager-table-sorting/)
 * Hey Guys.
 * I have the following problem. The custom sorting of tables in leaguemanager are
   1.) points, 2.) goal difference and 3.) teamID. That is not what i need.
 * What i need is 1.) points, 2.) goal difference and 3.) goals done.
 * Is there anyway to edit/change this to the other-two-scores.php??

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [adzeds](https://wordpress.org/support/users/adzeds/)
 * (@adzeds)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-leaguemanager-table-sorting/#post-1178481)
 * I need this to!
 * Hopefully there will be a new update soon because there are many problems with
   the current version!
 *  Thread Starter [garthnait](https://wordpress.org/support/users/garthnait/)
 * (@garthnait)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-leaguemanager-table-sorting/#post-1178492)
 * I tried my self to change the sorting, but it doesn’t work.
 * I changed this
 *     ```
       /**
       	 * rank Teams
       	 *
       	 * @param array $teams
       	 * @return array of teams
       	 */
       	function rankTeams( $teams )
       	{
       		foreach ( $teams AS $key => $row ) {
       			$points[$key] = $row->points['plus'];
       			$done[$key] = $row->done_matches;
       			$diff[$key] = $row->diff;
       		}
   
       		array_multisort( $points, SORT_DESC, $diff, SORT_DESC,  $done, SORT_ASC, $teams );
       		return $teams;
       	}
       ```
   
 * into this
 *     ```
       /**
       	 * rank Teams
       	 *
       	 * @param array $teams
       	 * @return array of teams
       	 */
       	function rankTeams( $teams )
       	{
       		foreach ( $teams AS $key => $row ) {
       			$points[$key] = $row->points['plus'];
       			$goals[$key] = $row->goals['plus'];
       			$done[$key] = $row->done_matches;
       			$diff[$key] = $row->diff;
       		}
   
       		array_multisort( $points, SORT_DESC, $diff, SORT_DESC,  $goals, SORT_DESC, $done, SORT_ASC, $teams );
       		return $teams;
       	}
       ```
   
 * but nothing changed in the sorting.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Leaguemanager] Table sorting’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [garthnait](https://wordpress.org/support/users/garthnait/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-leaguemanager-table-sorting/#post-1178492)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
