I am sorting $myarray
with natsort($myarray)
. The array is sorted and the index numbers are maintained as you can see below.
Before sort
Array ( [0] => 2 C [1] => 3 A [2] => 1 B )
After sort
Array ( [2] => 1 B [0] => 2 C [1] => 3 A )
Is it possible to sort without maintaining the index numbers? I expected an array like this after I sort:
Expected result
Array ( [0] => 1 B [1] => 2 C [2] => 3 A )