吴裕雄--天生自然 PHP开发学习:While 循环

<html>
<body>

<?php
$i=1;
while($i<=5)
{
    echo "The number is " . $i . "<br>";
    $i++;
}
?>

</body>
</html>

<html>
<body>

<?php
$i=1;
do
{
    $i++;
    echo "The number is " . $i . "<br>";
}
while ($i<=5);
?>

</body>
</html>

猜你喜欢

转载自www.cnblogs.com/tszr/p/10947576.html