Home >Backend Development >PHP Tutorial > 数值相减,怎样保留小数点后面的0?解决思路

数值相减,怎样保留小数点后面的0?解决思路

WBOY
WBOYOriginal
2016-06-13 13:39:191274browse

数值相减,怎样保留小数点后面的0?
数值相减,怎样保留小数点后面的0?






------解决方案--------------------
number_format($a,4) 这样试试。
------解决方案--------------------
echo bcsub(100.0000,75.0000,4);

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