PHP sort() Function - W3Schools Parameter, Description. array, Required. Specifies the array to sort. sortingtype, Optional. Specifies how to compare the array elements/items. Possible values:.