sort
PHP 4, PHP 5, PHP 7, PHP 8
sort - Sort an array in ascending order
Example #1 sort example
Result: fruits[0] = apple
fruits[1] = banana
fruits[2] = lemon
fruits[3] = orange
Example #2 sort example using case-insensitive natural
ordering
Result: fruits[0] = Orange1
fruits[1] = orange2
fruits[2] = Orange3
fruits[3] = orange20
Example #3 of sort