- $GLOBALS["col"] = $col; // Column or Columns as an array
- $GLOBALS["dir"] = $dir; // Direction, a positive number for ascending a negative for descending
-
- function comp2($a,$b,$i = 0) {
+ $GLOBALS['col'] = $col; // Column or Columns as an array
+ if ($dir > 0)
+ $dir = 1;
+ else
+ $dir = -1;
+ $GLOBALS['dir'] = $dir; // Direction, a positive number for ascending a negative for descending
+
+ usort($ary,'array_comp2');
+ return $ary;
+ }
+
+ function array_comp2($a,$b,$i = 0) {