int ksort
(array array [, int sort_flags])
Sorts an array by key, maintaining key to data correlations. This is useful mainly for associative arrays.
Példa 1. Ksort() example
|
This example would display:
1 2 fruits[a] = orange 3 fruits[b] = banana 4 fruits[c] = apple 5 fruits[d] = lemon 6 |
You may modify the behavior of the sort using the optional parameter sort_flags, for details see sort().