I am trying create a trending system that displays which keywords are trending by checking the occurrence of their usage. I have able to get the count of occurences of the keywords into an array like this
$keyword_occurences = array("pheed"=>5, "php"=>7, "love" => 700);
How do I display this in descending order of occurrence?
Try using functions
asortand/orarsortto sort an associative array by values.