php格式化数字

$str=intval('123456')

number_format($str);

这个函数可以使用千位分隔符格式化数据

函数输出结果

123,456

原文地址:https://www.cnblogs.com/dtiove/p/5810271.html