New course! Every coder should learn Generative AI!
Try a free lesson0
$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.