How do you sort a multidimensional array by primary and secondary key? For example, assuming the following array:
$result = array(); $result[0][\"prio\"] =
You may use usort() to define custom sort function. Here's an example
usort()
$value) { echo "$key: $value\n"; } ?>
The output will be
0: 1 1: 2 2: 3 3: 5 4: 6
More info can be found at http://www.php.net/manual/en/function.usort.php It should help you get started.