Reverse order and forward order
$arr = array(10,2,4,6,3,1,3,2,5,9,8,7);
$len = count($arr);
$n = $len-1;
for ( $i=0; $i<$len; $i ){
for ( $j = 0;$j<$n;$j ){
switch ($type){
case 'ASC': //Sort from small to large
 %
}
break;
}
}
}
益达丶W62019-09-01 17:32:26
An error will be reported when replying to this article: https://www.php.cn/jishu/php/411159.html