开发者

Simple PHP counter - how to print numbers with loop?

开发者 https://www.devze.com 2022-12-17 18:57 出处:网络
How can I print out the numbers from 0 to 20 with a loop in PHP? I hope some one can help. Thank开发者_开发知识库s!You want a for loop:

How can I print out the numbers from 0 to 20 with a loop in PHP?

I hope some one can help.

Thank开发者_开发知识库s!


You want a for loop: http://php.net/manual/en/control-structures.for.php


Use a for loop:

for ($i = 0; $i <= 20; $i++)
{
    echo $i . "\n";
}
0

精彩评论

暂无评论...
验证码 换一张
取 消