okay, i just wrestled with the easiest part of this page, because i couldn't figure out why asort() wasn't returning all my array elements in sorted order. it would leave out a different amount for each different sort. i used the documentation for recalling the values of a sorted array in order, much like a perl hash would do:
asort($sortedFolders);
for(reset ($sortedFolders); $key = key ($sortedFolders); next ($sortedFolders)) {
print "$sortedFolders[$key}<br>";
}
well, i believe i found the problem, and would like to share, because nobody should go through what i just did.
once $key became "0", after finding the 0-index of the sorting array, the statement:
"$key = 0" in the "for" loop killed it. so, as a quick fix, you can either pad the array with "zzzzzzzz" (or something youre sure will result at the end of your search), or just start the array at 1 instead of 0.
feedback if you've had this problem before, or disagree/agree with me.
thanks,
yes, i'm a perl guy who just switched over 🙂
-blake