- function ary_sort($ary,$col, $dir = 1){
- // The globals are used because USORT determines what is passed to comp2
- // These should be $this->col and $this->dir in a class
- // Would beat using globals
- if(!is_array($col)){
- $col = array($col);
- }
- $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
+function ary_sort($ary,$col, $dir = 1)
+{
+ /* The globals are used because USORT determines what is passed to comp2 */
+ /* These should be $this->col and $this->dir in a class */
+ /* Would beat using globals */
+ if (!is_array($col)) {
+ $col = array($col);
+ }
+ $GLOBALS['col'] = $col; /* Column or Columns as an array */
+ if ($dir > 0) {
+ $dir = 1;
+ }
+ else {
+ $dir = -1;
+ }
+ /* Direction, a positive number for ascending a negative for descending */
+ $GLOBALS['dir'] = $dir;