Joe90 wrote:
Why does it go in the order of the first digit? Instead of 10 being the tenth one, it is the second one, because it begins in a 1. Can anyone explain this to me, in quite a simple way? Thanks.
It is likely sorting alphabetically instead of numerically. Alphabetically, the sort is from left to right and that one might have more characters or digits than the other doesn't matter. For example "ant" comes after "aardvark".
Numerically, "1000" comes after "20", but alphabetically, "1000" comes before "20" because "1" comes before "2".
As Fnord suggested, putting 0 in front of the single digits would solve the problem. If there is any possibility that the list could exceed 99 items, you might want to pad them with one or two 0's on the left, as the case may be so you don't have to do so later.