number_format_i18n()
number_format_i18n( float $number, int $decimals )
根据区域设置将浮点数转换为格式。
Convert float number to format based on the locale.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$number | (float) | 必需 | 要根据区域设置转换的数字。 |
$decimals | (int) | 可选 | 小数位数的精度。默认值0。 |
返回(Return)
(string)以string格式转换的数字。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.3.0 | wp-includes/functions.php:409 | 48 | 3 |
笔记(Notes)
基本示例
使用$decimal参数
number_format_i18n() 为WP2原创文章,链接:https://www.wp2.cn/functions/number_format_i18n/