• sorting arrays

      1 comment

    Both sort() and asort() is used to sort values in ascending order.To sort them in descending order what are the functions that we can use?

    rsort() – Where it resets key associations as well.
    arsort() – Where it sorts in descending order, while keeping the key associations as well.