Run »
"; usort($arr1,"strcmp"); print_r($arr1); echo "
"; echo "
"; echo "Natural order string comparison"."
"; usort($arr2,"strnatcmp"); print_r($arr2); ?>
Standard string comparison
Array ( [0] => pic01 [1] => pic1 [2] => pic10 [3] => pic100 [4] => pic2 [5] => pic20 [6] => pic200 [7] => pic30 )
Natural order string comparison
Array ( [0] => pic01 [1] => pic1 [2] => pic2 [3] => pic10 [4] => pic20 [5] => pic30 [6] => pic100 [7] => pic200 )