Home > Backend Development > PHP Tutorial > PHP for循环小数出现的有关问题

PHP for循环小数出现的有关问题

WBOY
Release: 2016-06-13 11:51:31
Original
1735 people have browsed it

PHP for循环小数出现的问题

本帖最后由 c520zf1986 于 2014-03-18 16:18:27 编辑
for ($i=81.3; $i <99.4; $i+=99.3) { <br />    echo $i."<br />";<br />}
Copy after login


如上打印结果到了90的时候不正常了,
新手求教,急~~~


------解决方案--------------------
引用:
帮人帮到底吧,怎么解决?不会函数。

echo round($i,2)."
";上面不是写出来了吗
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