标签:ret func int turn cti print for temp function
$arr = [4,5,3,7,8,9];
print_r(maopao($arr));
function maopao($arr){
$len = count($arr);
$n = $len-1;
for ($i=0;$i<=$len;$i++){
for ($j=0;$j<$n;$j++){
if ($arr[$j+1]<$arr[$j]){
$temp = $arr[$j];
$arr[$j] = $arr[$j+1] ;
$arr[$j+1] = $temp;
}
}
}
return $arr;
}
标签:ret func int turn cti print for temp function
原文地址:https://www.cnblogs.com/vilucky/p/12299208.html