When you sort strings, lets say you have the following numbers:
1, 28, 40, 7, 3
they would be sorted like this
1
28
3
40
7
I think you can use array_multisort()
$numbers = array(18, 6, 11, 24, 2);
array_multisort($numbers, SORT_ASC, SORT_NUMERIC);
echo '<pre>';
print_r($numbers);
echo '</pre>';
Cgraz