September 2001
Intermediate to advanced
768 pages
32h 45m
English
string number_format(float num, [int places], [string decimal_separator], [string thousands_separator])
Returns the formatted string representation of the value according to the format specified.
Returns:
Formatted number as a string
Description:
This function returns a string representation of the value given by num . This string has places decimal places, the decimal separator (radix) is decimal_separator , and the thousands separator is thousands_separator . This can be useful for printing numeric values intended for audiences in different locales or countries.
If you supply decimal_separator , you must also supply thousands_separator .
The default formatting is US/British. The default value for decimal_separator is, (a single ...
Read now
Unlock full access