= $maxV){ $maxV = $n[$j]; $maxInd = $j; } } if($maxV > $n[$i]){ $tmp = $n[$i]; $n[$i] = $maxV; $n[$maxInd] = $tmp; break; } } echo $n."\n"; ?>