Looping through all combinations
Hi. I'm new here and such. It's been a few years since I've been on any coding forums, but this one seems to be the most active from the forums I remember.
Anyway, I know this has been discussed many times before, but what I'm trying to do is a little different, and I have yet to find or come up with any satisfactory solutions. Basically, given the array,
$arr = array(0, 1, 2, 3, 4);, I want to produce the following results:
The order of the elements in the array are from most to least important. In other words, the order of the results are from most to least important, or most to least similar to the original array.
Right now I can't even think of how to get started, so any help would be greatly appreciated.