【php开源代码栏目提醒】:网学会员为广大网友收集整理了,EX06-05.php,希望对大家有所帮助!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<meta http-equiv="Content-Language" content="zh-tw">
<title>寻找3的倍数</title>
</head>
<body background="EX06-05/BG01.jpg"><FONT color="Blue">
<center>
<table border=1>
<script language = "php">
echo("1至50的数字中第9个3的倍数是:<br>");
$num=$count=0;
$j=" ";
do
{
++$num;
if($num%3==0)
{
++$count;
if($count==9)
{
$i=$num;
echo($i."<br>");
echo("前八个数字是:<br>".$j);
exit;
}
else
{
$j=$j." ".$num;
}
}
}
while($num<=50);
echo("此行测试当使用exit之后是否仍会显示出来!");
</script>
</center>
</body>
</html>