I am adding values from one array into another array. How would I sort the second array by the index numbers of the first.
example:
PHP Code:
this.firstarray = {1,2,3,4,5,6,7,8,9,10,11,12,13};
for (temp.i = 0; temp.i<7; temp.i++){
temp.random = int(random(0,13));
this.secondarray.add(this.firstarray[temp.random]);
//some algorthm to sort the second array by the index's of the first array
}
Does this make any sense?