Yes, if you use arraysort, it will change data in each index.
It will not change anything for the code above, as long as you use arraysort outside the while…wend boucle.
But if you don’t care about the order of the array, you can also use arraysort to accelerate the process of removing the data that are no longer relevant.
If you want to keep the ability of using the instruction “Iset”, you can use a temporary array to keep only relevant data, then use “unset” to delete the first array and then move back the data in it…
There is always lot of solutions, the best (fast, shorter, etc) one will depend on what you plan to do with your code…