number_format
number_format — Format a number with grouped thousands.Description
number_format( float $num,Formats a number with grouped thousands and optionally decimal digits.
int $decimals = 0,
?string $decimal_separator = ".",
?string $thousands_separator = "," ): string
Parameters
num
The number being formatted.
decimals
The number of decimal digits to display.
decimal_separator
The character(s) to use as the decimal point.
thousands_separator
The character(s) to use as the thousands separator.
Return Values
A formatted version of num.More information about number_format on official PHP documentation site
number_format - Popular snippets
- PHP 8.1 / MySQL 5.7 number_format microtime
last run:
2022-05-18 07:56:49
6
- PHP 8.1 / MySQL 5.7 number_format str_replace number_format str_replace number_format str_replace
last run:
2022-08-06 07:38:02
4
- PHP 8.1 / MySQL 5.7 number_format
last run:
2022-08-06 03:53:09
4
- PHP 8.0 / MySQL 5.7 json_decode number_format
last run:
2021-12-31 04:00:23
4
- PHP 8.0 / MySQL 5.7 number_format microtime mt_rand mt_getrandmax round print_r array_sum
last run:
2021-09-10 04:02:14
4
- PHP 8.1 / MySQL 5.7 json_encode number_format
last run:
2023-07-04 11:45:01
3
- PHP 8.1 / MySQL 5.7 number_format time explode microtime round sleep
last run:
2022-12-17 23:36:06
3
- PHP 8.1 / MySQL 5.7 number_format
last run:
2022-08-06 03:52:52
3
number_format - New snippets
-
PHP 8.0 / MySQL 8.0 number_format
added at:
2023-10-17 08:41:14
1
-
PHP 8.0 / MySQL 8.0 number_format
added at:
2023-10-17 08:40:49
2
-
PHP 8.0 / MySQL 8.0 number_format
added at:
2023-10-17 08:40:45
1
-
PHP 8.0 / MySQL 8.0 number_format
added at:
2023-10-17 08:40:35
1
-
PHP 8.1 / MySQL 5.7 print_r number_format
added at:
2023-10-06 05:13:04
1
-
PHP 8.1 / MySQL 5.7 number_format print_r
added at:
2023-09-27 05:37:32
1
-
PHP 8.1 / MySQL 5.7 number_format print_r
added at:
2023-09-18 08:20:25
1
-
PHP 8.1 / MySQL 5.7 var_export number_format
added at:
2023-07-13 08:33:57
1
-
PHP 8.1 / MySQL 5.7 json_encode number_format floor
added at:
2023-07-04 12:12:28
1
-
PHP 8.1 / MySQL 5.7 json_encode number_format floor
added at:
2023-07-04 12:12:11
1