ArrSort_2Arr

Sort 2 1-dimension arrays
Actually sort 1st array (Array1) based on values ascending or descending, then change items in Array2 to match order in Array1
Sort can be in Ascending or Descending order.
Not like sortArray, this one involves two arrays, and can decide order

Edit 2021-10-12: Adding ability in v2 to ignore case in sorting strings.


Public

Tested

My Own Work

arrShort, byRef arrSub, Order_1Asc_2Desc

Sort A2 ascending into A3, then re-order items in A1 according to new list
A3 = ArrSort_2Arr(A2, A1, 1)

Sort A2 descending into A4, then re-order items in A1 according to new list
A4 = ArrSort_2Arr(A2, A1, 2)

Views 5295 Downloads 1430

Classic ASP Components
ANmarAmdeen
865
Attachments
Revisions

v2.0