WPDev.one
Core Function
View Source on Trac ↗

number_format_i18n()

number_format_i18n( mixed $number, mixed $decimals = 0 )

Converts float number to format based on the locale.

Parameters 1 required

Name / Type Description
$number
float

The number to convert based on locale.

Required
$decimals
int

Optional. Precision of the number of decimal places. Default 0.

Return Value

(string)
Converted number in string format.

Function Information

Since Version
2.3.0
Source File
wp-includes/functions.php
Advertisement