An array that needs to be sorted numerically
Posted: Mon Apr 09, 2012 1:25 pm
Hi, I have an array that would like to sort numerically but it also contains strings, when sorted the following comes:
When it should be
The strings are mandatory for me on this array, it just starts with the right number to be sorted but the sort turns out to be bad, thanks. I'm using rsort($arri);
Code: Select all
9{},8{},7{},6{},5{},4{},3{},2{},1{},10{},11{}0{}
Code: Select all
11{},10{},9{},8{},7{},6{},5{},4{},3{},2{},1{},0{}