I expected this:
$f[14][5] = array('');
$f[13][1] = array('');
$f[13][3] = array('');
$f[13][2] = array('');
$f[14][1] = array('');
$f[13][2] = array('');
$f[14][2] = array('');
$f[14][4] = array('');
$f[14][3] = array('');
$f[13][4] = array('');
$f[13][5] = array('');
krsort($f);
echo '<pre>';
print_r($f);
to sort like
14 5,
14 4,
14 3,
14 2,
14 1,
13 5,
13 4,
13 3,
13 2,
13 1
but it doesn't. Somehow the second key is not sorted.
What is the most elegant short way to achieve this?
(investigated usort in a manner like for instance in Sorting multidimensional array in PHP but I cannot find a way to target the second key)
thx