I have an array as follows:
array(1) {
[0]=> string(1) "2"
[1]=> string(1) "1"
[2]=> string(1) "3"
[3]=> string(1) "4"
[4]=> string(1) "5"
[5]=> string(1) "6"
[6]=> string(1) "7"
}
}
What I would like to do is order a second Array based on the above (which alters with user selection):
Array {
"Two" => "Two",
"One" => "One",
"Three" => "Three",
"Four" => "Four",
"Five" => "Five",
"Six" => "Six"
"Seven" => "Seven"
}
EDIT: The user access the page where there is a jQuery Sortable list - they order it as they please and this is saved to the DB, what I'm trying to do now is when the user comes back to the page is make sure the list is in the order they set out. So it is the order they set.
The second array is the array that populate the list on the .PHP page and that's why I need it to match the first array.
I've looked at array_multisort but no joy.
I'm assuming I'd do some of Loop in PHP to populate the second array before using it but I'm struggling - any suggestions?