PHP natsort() Function

The natsort() function sorts an array by using a “natural order” algorithm. The values keep their original keys.

This function implements a sort algorithm that orders alphanumeric strings in the way a human being would while maintaining key/value associations.

ParameterDescription
arrayRequired. Specifies the array to sort

Syntax

natsort(array) 

Leave a Reply

Your email address will not be published. Required fields are marked *