I have PHP array that looks like
$my_arr['cats'] = array('Shadow', 'Tiger', 'Luna');
$my_arr['dogs'] = array('Buddy', 'Lucy', 'Bella');
$my_arr['dolphins'] = array('Sunny', 'Comet', 'Pumpkin');
$my_arr['lizzards'] = array('Apollo', 'Eddie', 'Bruce');
//and many more lines like this
I need to sort it based on it keys using sorting array like
$order = array('lizzards', 'cats');
I want that the first item should be lizzards array, second item - cats and then all items that were not specified in $order array. How it can be done using usort / uasort / uksort functions?