PHP » GoLang |
login |
register |
about
|
number_format(PHP 4, PHP 5, PHP 7) number_format — Format a number with grouped thousands Description
string number_format
( float
$number
[, int $decimals = 0
] )
string number_format
( float
$number
, int $decimals = 0
, string $dec_point = "."
, string $thousands_sep = ","
)This function accepts either one, two, or four parameters (not three):
If only one parameter is given,
If two parameters are given,
If all four parameters are given, Parameters
Return Values
A formatted version of Changelog
Examples
Example #1 number_format() Example For instance, French notation usually use two decimals, comma (',') as decimal separator, and space (' ') as thousand separator. The following example demonstrates various way to format a number:
<?php Changelog
See Also
|
more
Recently updated
more
Most requested
more
Last requests
|