I need to sort an array. Both values and keys are the same and are strings. Basically, array looks similar to this:
$test = array(
'1' => '1',
'2' => '2',
'1.5' => '1.5',
'3' => '3',
'4' => '4',
'3.5' => '3.5',
'2XS' => '2XS',
'2XL' => '2XL',
'XXL' => 'XXL',
);
Expected Output:
Array
(
[0] => 1
[1] => 1.5
[2] => 2
[5] => 3
[6] => 3.5
[7] => 4
[3] => 2XL
[4] => 2XS
[8] => XXL
)
Any ideas?