Source Code:
(back to article)
<?php $numbers = array(2, 5, 1, 7, 3); asort($numbers, SORT_NUMERIC); print_r($numbers);// Output: Array ( [2] => 1 [0] => 2 [4] => 3 [1] => 5 [3] => 7 ) ?>
Result:
Report an issue