您好,欢迎访问一九零五行业门户网

舍去法取整 版本的 number_format() 函数

舍去法取整 版本的 number_format() 函数
/**
 * 舍去法取整 版本的 number_format() 函数
 * @author leeyi 
 */
function number_format_floor($number, $decimals=0, $dec_point='.', $thousands_sep=',') {
    $tmp = pow(10,$decimals);
    return number_format(floor($tmp*($number))/$tmp, $decimals, $dec_point, $thousands_sep);
}
ad:真正免费,域名+虚机+企业邮箱=0元
其它类似信息

推荐信息