Concept Framework 2.2 documentation Contents | Index

standard.C.math.number_format

Name Version Deprecated
number_format version 1.0 no

Prototype:
string number_format(number number, number decimals, string dec_point, string thousands_sep)

Parameters:
number      the number to format
decimals      the number of decimals
dec_point      the decimal point character to use
thousands_sep      the thousands separator

Description:
Format number with decimals decimals, dec_point instead of a dot before the decimals and thousands_sep instead of a comma (",") between every group of thousands.

Example:
var number=1234.5678;
echo number_format(number, 2, '.', ','); // 1,234.57

Returns:
Returns the formatted versuib of the number as a string.

Documented by Simona Gabriela Plesuvu, generation time: Sun Jan 27 18:15:15 2013 GMT(c)2013 Devronium Applications