sort() / rsort()Sorts the array (in place).Syntaxsort($arr)Descriptionsort sorts ascending, rsort sorts descending. Modifies the array in place.ExampleLoading editor…▶ Try it yourselfExpected output1,2,3When to use?Sorting scores/names.Related commandsarray / [ ]← in_array() / array_search()array_map() / array_filter() →