Call it this way… array_sort($array,’index1′,’index2′,etc.); You can place a ! in front of the index name (e.g., !index1) to indicate a reverse sort. Ensure these two functions are available in the source or associated includes: function array_sort_func($a,$b=NULL) { static $keys; if($b===NULL) return $keys=$a; foreach($keys as $k) { if(@$k[0]==’!’) { $k=substr($k,1); if(@$a[$k]!==@$b[$k]) { return strcmp(@$b[$k],@$a[$k]); } ..