PHP价格保留2位小数

number_format

number_format(‘15124.0000′,2,’.’,”)

第一个参数  需要处理的字符串

第二个参数  需要保留的小数位

第三个参数  为 . 

第四个参数  为 空  或者  为 , 

这是对价格的处理

0
0
Tags:

发表回复

Your email address will not be published. Required fields are marked *.

*
*