//echo rand(1,100);
$max=0;
$min=100;
for($i=0;$i<=9;$i++){
$rand[$i]=rand(1,100);
if($rand[$i]>$max){
$max=$rand[$i];
}
if($rand[$i]<$min){
$min=$rand[$i];
}
$str.=$rand[$i].",";
}
//去除最后一個逗號
$str.="quchu";
$str=str_replace(",quchu","",$str);
echo "最大數是:".$max;
echo "<hr>";
echo "最小數是:".$min;
echo "<hr>";
//echo "原型是:".$str;
echo "<hr>";
echo "中間數是:".str_replace($min.",","",str_replace($max.",","",$str));