Is there any funtion in php for sorting array value in descending order? | SoloLearn: Learn to code for FREE!

0

Is there any funtion in php for sorting array value in descending order?

6/14/2017 8:52:47 AM

VISHAL SRIVASTAVA

1 Answer

New Answer

0

$fruits = array("lemon", "orange", "apple", "banana"); $fruits = rsort($fruits); print_r($fruits); //output will be orange, lemon, banana and apple. rsort() is the function you are looking for.