<html>
<body>
$age=array("Peter"=>"35","Ben"=>"37","Joe"=>"43");
asort($age);
foreach($age as $x=>$x_value)
{
echo "Key=" . $x . ", Value=" . $x_value;
echo "<br>";
}
</body>
<!-- Mirrored from www.w3schools.com/php7/phptryit.asp?filename=tryphp_func_asort by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 13:40:42 GMT -->
</html>