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

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

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

PHP for循环小数出现的问题

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


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


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

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