时间:2021-07-01 10:21:17 帮助过:5人阅读
for ($j=0;$j
$min = $arr[$i+1];
$arr[$i+1] = $arr[$i];
$arr[$i] = $min;
}
}
echo "当前数组为:";print_r($arr);echo "
";
}
http://www.bkjia.com/PHPjc/754034.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/754034.htmlTechArticle 代码如下:$arr = array(900 , 20 , 16 , 50 , -2 , 10 , 3); $min = $max = 0; for ($j=0;$jcount($arr);$j++){ for($i=0;$icount($arr)-1;$i++){ if($arr[$i] $arr[$i+1]){...