Source Code:
(back to article)
<?php $students = array( "John" => 85, "Alice" => 92, "Bob" => 76, "Charlie" => 88 ); asort($students); print_r($students); // Output: Array ( [2] => 76 [0] => 85 [3] => 88 [1] => 92 ) ?>
Result:
Report an issue