Sorted by Name:" For i = LBound(nameArray) to UBound(nameArray) Response.Write nameArray(i, 0) & " - " Response.Write nameArray(i, 1) & "" Next %> <% Sub arraySort(byRef arrArray, DimensionToSort) Dim i, x, smallest_value, smallest_key, rememberkey, rememberval, swap_pos, OtherDimension Const column = 1 If DimensionToSort = 1 then OtherDimension = 0 ElseIf DimensionToSort = 0 then OtherDimension = 1 End If For i = 0 To UBound( arrArray, column ) - 1 smallest_value = arrArray ( i, DimensionToSort ) rememberkey = arrArray ( i, OtherDimension ) rememberval = arrArray ( i, DimensionToSort ) swap_pos = i For x = i + 1 to UBound( arrArray, column ) If arrArray ( x, DimensionToSort ) < smallest_value Then swap_pos = x smallest_value = arrArray ( x, DimensionToSort ) smallest_key = arrArray ( x, OtherDimension ) End If Next If swap_pos <> i Then arrArray ( swap_pos, OtherDimension ) = rememberkey arrArray ( swap_pos, DimensionToSort ) = rememberval arrArray ( i, OtherDimension ) = smallest_key arrArray ( i, DimensionToSort ) = smallest_value End If Next End Sub %>