Try the strnatcmp()
for “natural” ordering, instead of strcmp()
(src) or handle the ID ordering specially, e.g. with typecasting and the spaceship operator <=>
in PHP 7.
Try the strnatcmp()
for “natural” ordering, instead of strcmp()
(src) or handle the ID ordering specially, e.g. with typecasting and the spaceship operator <=>
in PHP 7.