Hello everyone,
I created this small script that shows a list of 10 people in an array.
Each person is associated with a number which is stored in another array.
Chris is associated with 3, Brian with 4, Daniel with 2, Stephen with 6 and so on.
I then made the first array (with the names in them), to be sorted in alphabetical order.
How can I make the second array with the numbers in them, also sorted accordingly so that each person is still matched with their number?
#include <Array.au3>
#include <File.au3>
Local $Array1[10] = ["Chris","Brian","Daniel","Stephen","William", "Joseph", "Diana", "Thomas", "Jason", "Carol"]
Local $Array2[10] = [3, 4, 2, 6, 7, 1, 9, 10, 5, 8]
_ArraySort($Array1)
_ArrayDisplay($Array1, "Sorted in Alphabetical Order")
;Display Array2 showing the new sorted out rows, so that each person is still matched with the number they are associated with. Results should show 4, 8, 3, 2, 9, 5, 1, 6, 10, 7
Thanks,
Brian