PDA

View Full Version : compare arrays



asthyanax
March 12th, 2005, 05:23 PM
Hi,

I have 2 arrays that contain the same values but in a different order. i'd like to reorder the first array like the second one but i have no ideas how to do that easily.
Thank's for your help.
Chris

sbeener
March 12th, 2005, 06:27 PM
will simply copying the first array do the trick?


array2 = array1.slice();

asthyanax
March 13th, 2005, 06:17 AM
In fact no. I really want to reorder it because i have other arrays that depends on this one.