Phil, try to sort array with PHP built in functions. Here is one example of PHP function that sorts array http://www.php.net/manual/en/function.asort.php I am not sure how the work with multi dimensional arrays. If that doesn't work, you will have to write your own functions. Cheers, Ilija http://www.softserbia.com