From 6df859f9638baaa26716283a1055881a2443f1d8 Mon Sep 17 00:00:00 2001 From: biglyderv Date: Thu, 23 Jan 2025 20:04:50 -0500 Subject: [PATCH] sort --- docs/stats.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/stats.php b/docs/stats.php index b24668f..2831bb0 100755 --- a/docs/stats.php +++ b/docs/stats.php @@ -36,10 +36,20 @@ $pr[$usern['username']] = log($h/10 + 1)*10* M_E; } } - foreach ($result as $usern) { ?> + + function cmp($a, $b) { + if ($a == $b) { + return 0; + } + return ($a > $b) ? -1 : 1; + } + + uasort($pr,'cmp'); + + foreach ($pr as $usern => $rr) { ?>
- -
Rank:
+ +
Rank: