PHP 数组函数 natsort()
PHP 数组函数 natsort()
<?php
$input1 = array('click.txt', 'img12.txt', 'img10.txt', 'img2.txt', 'img1.txt', 'IMG3.txt');
$input2 = $input1;
natsort($input2);
echo " \n Natural order sorting \n";
print_r($input2);
?>
<?php
$input1 = array('click.txt', 'img12.txt', 'img10.txt', 'img2.txt', 'img1.txt', 'IMG3.txt');
$input2 = $input1;
natsort($input2);
echo " \n Natural order sorting \n";
print_r($input2);
?>