I feel like I'm missing something on the example for Sort Array (Ascending Order), According to Value - asort(). I added a var_dump and also switched the variables to ABC, and don't see that any sorting is occurring.
<!DOCTYPE html>
<html>
<body>
<?php
$age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43");
asort($age);
var_dump($age);
echo "<br><br>";
foreach($age as $x => $x_value) {
echo "Key=" . $x . ", Value=" . $x_value;
echo "<br>";
}
echo "<br>";
$age = array("C"=>"35", "B"=>"37", "A"=>"43");
asort($age);
var_dump($age);
echo "<br>";
echo "<br>";
foreach($age as $x => $x_value) {
echo "Key=" . $x . ", Value=" . $x_value;
echo "<br>";
}
?>
</body>
</html>