代码如下:
$arr = array(900,20,16,50,-2,10,3);
$min = $max = 0;
$min = $max = 0;
for ($j=0;$j
$min = $arr[$i+1];
$arr[$i+1] = $arr[$i];
$arr[$i] = $min;
}
}
echo "当前数组为:";print_r($arr);echo "
";
}