Make a usort. You must define a sorting function first if you are still using PHP version 5.2 or earlier:
function sortByOrder($a, $b) {
return $a['order'] - $b['order'];
}
usort($myArray, 'sortByOrder');
You can use an anonymous function as of PHP 5.3:
usort($myArray, function($a, $b) {
return $a['order'] - $b['order'];
});
You can employ the spaceship operator with PHP 7:
usort($myArray, function($a, $b) {
return $a['order'] <=> $b['order'];
});
I hope this helps you.