Home >Backend Development >PHP Tutorial >新手求教for如何打印循环0.01这样小数点格式的数字

新手求教for如何打印循环0.01这样小数点格式的数字

WBOY
WBOYOriginal
2016-06-13 11:51:331178browse

新手求教for怎么打印循环0.01这样小数点格式的数字。
如我要打印
0.01
0.02
0.03
0.04
0.05
......
0.99

这样的数字,PHP怎么打印?用for怎么打印出来?
------解决方案--------------------

for ($i=0.01; $i < 1; $i+=0.01) { <br />	echo $i."<br />";<br />}

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn