asort () function retains the array's keys in the original state : Array sort : Data Structure PHP Source Code


PHP Source Code » Data Structure » Array sort »

 

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";
  }
 ?>
           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Data Structure
» Array sort