格式化函数 , 保留指定位数小数

sprintf('%.2f',$a)
//强大的格式化函数
//结果为字符串
//小数点位数不够,填充0
原文地址:https://www.cnblogs.com/pansidong/p/11605939.html