Easy Tutorial
❮ Php Isset Function Pdo Prepare ❯

PHP natcasesort() Function



Definition and Usage

The natcasesort() function sorts an array using a "natural order" algorithm. The key-value pairs retain their original keys.

In a natural order algorithm, the number 2 is less than the number 10. In a computer sorting algorithm, 10 is less than 2 because the first digit of "10" is less than 2.

This function is case-insensitive.

The function returns TRUE on success and FALSE on failure.

Syntax

Parameter Description
array Required. Specifies the array to be sorted.

Example

The above code will output:


❮ Php Isset Function Pdo Prepare ❯