asort () function retains the array's keys in the original state
<?php
$associatedarray = array (
FirstName => "D",
LastName => "C",
Designation => "Editor",
Hobby => "No",
Sign => "A");
asort ($associatedarray);
foreach ($associatedarray as $key => $val) {
echo "$key = $val", "\n";
}
?>
Related examples in the same category