@Markus
Sure Markus,
array1 is an array of files
I have then had to do some mapping to get the correct order to display each of the files.
After that mapping, it turns out the correct order is the order of array2.
I can't just "refill" array1 with the actual files, so I need to sort array1 in the order of array2 before I display them. (There is no "natural" order to array2's files; it's not like they're alphabetically ordered or anything - that would make it easy)
Does this make sense?
I'm sure php can somehow do it. I have spent a number of hours on this, but have not had any success yet, and I decided it was time to get some more knowledgable people to help me :)