Sort Associative array with asort method in PHP

You can use the function asort if you want to sort an associative array in PHP.

Sort Associative array with asort method in PHP

Below is a sample code snippet demonstrating the usage of asort method to sort Associative array in PHP.

$marks=array("a"=>"76","b"=>"100","c"=>"45");

asort ($marks);
%d