Source Code:
(back to article)
<?php $fruits = [ "apple" => 2, "banana" => 1, "orange" => 3, ]; function cmp($a, $b) { return strcmp($a, $b); } uksort($fruits, "cmp"); print_r($fruits);
Result:
Report an issue