Sort an associative array in descending order, according to the key:


SUBMITTED BY: henry1874w

DATE: June 27, 2017, 5:01 p.m.

FORMAT: Text only

SIZE: 76 Bytes

HITS: 265

  1. <?php
  2. $age=array("Peter"=>"35","Ben"=>"37","Joe"=>"43");
  3. krsort($age);
  4. ?>

comments powered by Disqus