I'd have a 2 dimensional array that I'd like to apply certain array functions to the various dimensions.
For example:
$a["Ack"]["Bob"] = 3;
$a["Ack"]["Joe"] = 1;
$a["Fnord"]["Bob"] = 5;
$a["Fnord"]["Joe"] = 7;
Now, I'd like to extract the keys of the first level (Ack, Fnord) from $a. I tried array_keys($a) and it didn't work. I'd also like to sort the first dimension, then within each of those keys, sort the next dimension.
Does anyone know how to do this? In other words, how do you provide a slice of the array, that's still part of the array?
Thanks!
Mark