<html>
<head>
<title>WHILE循环的使用示例</title>
<meta http-equiv=content-type content="text/html; charset=gb2312">
</head>
<body>
<h2 align=center >WHILE循环的使用示例</h2>
<hr color=red>
<? //PHP程序开始
//用来保存各个阶乘
n=1;i=1;
/*******************
WHILE循环的使用示例
i是循环变量每次循环时i自动增1
当i显示到9的时候结束∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/while(i<10)
{
n=n*i;echo"<h4align=center>";echoi;
echo"!=";
echo n;echo"</h4>/n";i++;
}
//php程序结束
?>
</body>
</html>
<head>
<title>WHILE循环的使用示例</title>
<meta http-equiv=content-type content="text/html; charset=gb2312">
</head>
<body>
<h2 align=center >WHILE循环的使用示例</h2>
<hr color=red>
<? //PHP程序开始
//用来保存各个阶乘
n=1;i=1;
/*******************
WHILE循环的使用示例
i是循环变量每次循环时i自动增1
当i显示到9的时候结束∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/while(i<10)
{
n=n*i;echo"<h4align=center>";echoi;
echo"!=";
echo n;echo"</h4>/n";i++;
}
//php程序结束
?>
</body>
</html>