1.

What are the different functions in sorting an array?

Answer»

 

The items of an array can be SORTED by various methods.

  • SORT() - it sort arrays in ascending order
  • rsort() - it sort arrays in DESCENDING order
  • asort() - it SORTS ASSOCIATIVE arrays in ascending order, according to the value
  • ksort() - it sort associative arrays in ascending order, according to the key
  • arsort() - it sorts associative arrays in descending order, according to the value
  • krsort() - it sorts associative arrays in descending order, according to the key


Discussion

No Comment Found