I am willing to sort array2 based on sorting order of array1
.. How to do it ?
In detail, I have two arrays - one with x coordinates and the
other with y coordinates of points. I need to sort those points
(arrays) based on their x position. Is it possible to create
multidimensional array with variables ?
Code attached does not work (mazbe because of the variable)
Thanx in advance
you can use the sort method of arrays with a custom sort
function to do what you want IF you were working with arrays and
assuming there's some relationship between the two arrays. eg, if
array2[ i ] should be sorted based on the value of array1[ i ],
then sort array2 first, and then sort array1.