sort

PHP 4, PHP 5, PHP 7, PHP 8
sort - Sort an array in ascending order
Sort Online Tool
Manual
Code Examples

Example #1 sort example

Result: fruits[0] = apple fruits[1] = banana fruits[2] = lemon fruits[3] = orange
PHP Version:

Example #2 sort example using case-insensitive natural ordering

Result: fruits[0] = Orange1 fruits[1] = orange2 fruits[2] = Orange3 fruits[3] = orange20
PHP Version:


Example #3 of sort

PHP Version: