number_format($price,$digit,$decimalpoint,$separator)

是php用来把数值类型的数据进行金额格式化 下面我就简单直白的解析一下这个函数 举个例子大家一看就明白

number_format("1000.5678",2,".",",");

即可得出 1,000.57