I have array with structure:
Array
(
[months] => Array
(
[01] => Array
(
[0] => 16
[1] => 31
)
[02] => Array
(
[0] => 16
[1] => 25
[2] => 10
[3] => 15
)
)
)
Now I trying to use uasort in loop:
foreach ($dates['months'] as $month) {
uasort($month, function($a, $b) {
return $a <=> $b;
});
}
But it's not sorting by days (sub-array of month) - why?
$montha reference in theforeach? I.e.as &$monthasort($month)will do the same.