I have a non-associative array where the data that comes in is not sorted (I\'m receiving the data from an outside system and cannot force it to come into the array in sorte
change your code to this:
$wedTrackTimes = array_unique($wedTrackTimes);
sort($wedTrackTimes);
print_r($wedTrackTimes);
as you can read in the documentation, the return value of sort()
is true/1 or false/0 and indicates if sorting was possible or an error occured.
That's right, sort returns bool
. Just use that:
sort($wedTrackTimes);