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

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

WBOY
Release: 2016-06-13 11:51:33
Original
1177 people have browsed it

新手求教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 />}
Copy after login

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template