Open cgutteridge opened 12 years ago
There may be a need to use a 'natural' sort which sorts numbers numerically so
http://id.example.org/1/foo http://id.example.org/5/foo http://id.example.org/11/foo
sort in that order. Alphabetic would give:
http://id.example.org/1/foo http://id.example.org/11/foo http://id.example.org/5/foo
http://php.net/manual/en/function.natsort.php
$values = array_map(array('Foo', 'forceString'), $list); natsort($values);
There may be a need to use a 'natural' sort which sorts numbers numerically so
http://id.example.org/1/foo http://id.example.org/5/foo http://id.example.org/11/foo
sort in that order. Alphabetic would give:
http://id.example.org/1/foo http://id.example.org/11/foo http://id.example.org/5/foo