I am having problems with ksorting an array: Here is what happens
I get a mutidimensional array that associates a (usually numeric) stem with a string (used to keep some school-year data in proper order). One class of data I call Progress monitoring does not have to have a season or month associated with it, so I just want to keep it (always) at the end of my array for various purposes).
The array first arrives from my query in random order:
$STEMS PRE_ksort
Array (
[015] => FALL
[045] => WINTER
[050] => January
[060] => February
[070] => March
[080] => April
[085] => SPRING
[090] => May
[100] => June
[110] => SUMMER (pretest)
[115] => SUMMER (posttest)
[000] => August
[010] => September
[020] => October
[030] => November
[040] => December
[PM] => Progress Monitoring
)
I thought that ksort would do this for me...but the key "PM" ends up in the wrong place.
$STEMS POST_ksort
Array (
[000] => August
[010] => September
[015] => FALL
[020] => October
[030] => November
[040] => December
[045] => WINTER
[050] => January
[060] => February
[070] => March
[080] => April
[085] => SPRING
[090] => May
[PM] => Progress Monitoring
[100] => June
[110] => SUMMER (pretest)
[115] => SUMMER (posttest)
)
Is there a way to do a quick sort like this such that "PM" always ends up a the bottom of the array?
Thanks.