sortArray

basic sort method sorts the elements of an array. sorts the elements as strings in alphabetical and ascending order.

Syntax

sortArray

Returns

returns (array) The array with the items sorted.

Parameters

array_source (array)
source array

Usage

example:

echo(objectToString(sortArray([7,1,4,5,2,1])));

output: [ 1, 1, 2, 4, 5, 7 ]