Here are the sorted results

Original
0 .. 12 Drummers Drumming
1 .. 7 Swans a'Swimming
2 .. 11 Pipers Piping
3 .. 9 Ladies Dancing
4 .. 10 Lords a'Leaping
5 .. 8 Maid a'Milking
Default Sort
0 .. 10 Lords a'Leaping
1 .. 11 Pipers Piping
2 .. 12 Drummers Drumming
3 .. 7 Swans a'Swimming
4 .. 8 Maid a'Milking
5 .. 9 Ladies Dancing
Numeric sort
0 .. 7
1 .. 8
2 .. 9
3 .. 10
4 .. 11
5 .. 12
Natural Sort
1 .. 7 Swans a'Swimming
5 .. 8 Maid a'Milking
3 .. 9 Ladies Dancing
4 .. 10 Lords a'Leaping
2 .. 11 Pipers Piping
0 .. 12 Drummers Drumming

From an article on The Horse's Mouth by Graham Ellis of Well House Consultants also covered in the Additional PHP material module of our PHP Programming course

Training sample © 2024, WELL HOUSE CONSULTANTS LTD
This is http://www.wellho.net/demo/nats.php
See source code here • More examples - same topic here
Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
Phone: +44 (0) 1225 708 225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net