I've got an multidimensional array like this:\[code\]Array( [thursday] => Array ( [0] => Array ( [title] => Movie2 [time] => 15.30 [venue] => VenueA ) [1] => Array ( [title] => Movie1 [time] => 13.00 [venue] => VenueB ) ))\[/code\]I want to sort it by time using array_multisort and this is going fine when I use it like this:\[code\]foreach ($movies['thursday'] as $key => $row) { $time[$key] = $row['time'];}array_multisort($time, SORT_ASC, $movies['thursday']);unset($time);\[/code\]But in this way, I have to repeat this code for each day of the week. So I'd like to use:\[code\]foreach ($movies as $movie) { foreach ($movie as $key => $row) { $time[$key] = $row['time']; } array_multisort($time, SORT_ASC, $movie); unset($time);}\[/code\]But now the array remains unsorted. As far as I can see the latter piece of code is functional equal to the former piece of code. Or am I making a huge conceptual mistake?