Bubble Sorting Integers....
Ok, I need to make function "bubble_sort" that takes form data (10 fields) and sorts them.
I am using the standard bubble sorting algorithm and using values (10, 9, 8, 7, 6, 5, 4, 3, 2, 1) the end result should be a list in order 1,2,3,4,5,6,7,8,9,10.
The result I am getting is 1,10,2,3,4,5,6,7,8,9. This makes me believe the function is treating the values as strings.
I am sending the values to the function from a form with 10 textboxes.
My question is if there is a way to cast the values as integers? I check the values to make sure they are integers, but the type is coming as strings...
Anyone done this before?