I know there has to be a reason but I can’t see it.
ksort — Sort an array by key in ascending order versus natsort — Sort an array using a "natural order" algorithm
I know there has to be a reason but I can’t see it.
Maybe because ksort has a flags parameter you can use to get other results.Mick wrote: ↑Sat Feb 04, 2023 11:23 amI know there has to be a reason but I can’t see it.
ksort — Sort an array by key in ascending order versus natsort — Sort an array using a "natural order" algorithm
ksort($avatar_list, SORT_NATURAL);
which will get the exact same result as natsort while natsort is doing only this.