This one is goofy.
I make a 2 dimensional array, simple like:
someloopingthing() {
$allcats[] = array('thing1','thing2','somenumber');
$sorter[] = 'somenumber';
}
Say that makes five rows, each having a 2 row array in it.
Then I go to dup and safely sort the dup for special case usage:
$allcatssorted = $allcats;
array_multisort($sorter,SORT_ASC,SORT_NUMERIC,$allcatssorted);
Ok, that works... if I loop out the contents of $allcatssorted, it is in the right order.
Here is the funky part though ... even though I only sorted $allcatssorted... if I loop out the contents of $allcats anytime FOLLOWING that multisort function... the $allcats array is ALSO SORTED in the exact same order!!!
How does that happen? Thats insane! I assigned the new array the contents of the original array, so that the original array wouldn't be touched... Am I missing something here??