代码如下:
$arr = array(900,20,16,50,-2,10,3);
$min = $max = 0;
原文链接:https://www.f2er.com/php/24812.html$min = $max = 0;
for ($j=0;$j
$min = $arr[$i+1];
$arr[$i+1] = $arr[$i];
$arr[$i] = $min;
}
}
echo "当前数组为:";print_r($arr);echo "
";
}