Hilft Dir das Folgende?
<?php
$final_array[0]['score']='foo';
$final_array[1]['score']='Foo';
$final_array[2]['score']='Bar';
$final_array[3]['score']='bar';
print_r( $final_array );
usort( $final_array, function( $a, $b ) {
return $b['score'] <=> $a['score'];
} );
print_r( $final_array );
function myusort( $arr ) {
usort( $arr, function( $a, $b ) {
return $b['score'] <=> $a['score'] ;
} );
return array_reverse( $arr, true );
}
print_r( myusort( $final_array) );
[Original]-Array
(
[0] => Array
(
[score] => foo
)
[1] => Array
(
[score] => Foo
)
[2] => Array
(
[score] => Bar
)
[3] => Array
(
[score] => bar
)
)
[Nach Deinem usort] Array
(
[0] => Array
(
[score] => foo
)
[1] => Array
(
[score] => bar
)
[2] => Array
(
[score] => Foo
)
[3] => Array
(
[score] => Bar
)
)
[Nach myusort]Array
(
[3] => Array
(
[score] => Bar
)
[2] => Array
(
[score] => Foo
)
[1] => Array
(
[score] => bar
)
[0] => Array
(
[score] => foo
)
)