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 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
- PHP 8.0 / MySQL 5.7 number_format json_encode
last run:
2022-01-20 12:13:42
3
number_format - New snippets
-
PHP 8.1 / MySQL 5.7 date strtotime number_format round date strtotime number_format round
added at:
2023-05-31 13:03:07
2
-
PHP 8.1 / MySQL 5.7 asort current number_format sprintf hash_algos hash print_r
added at:
2023-05-26 08:14:56
1
-
PHP 8.1 / MySQL 5.7 sprintf number_format hash_algos hash print_r
added at:
2023-05-26 08:14:39
1
-
PHP 8.1 / MySQL 5.7 number_format
added at:
2023-04-30 10:52:16
1
-
PHP 8.1 / MySQL 5.7 number_format
added at:
2023-04-30 10:51:03
1
-
PHP 8.1 / MySQL 5.7 number_format strlen explode
added at:
2023-02-06 10:15:00
1
-
PHP 8.1 / MySQL 5.7 number_format var_dump
added at:
2023-02-06 09:56:28
1
-
PHP 8.1 / MySQL 5.7 number_format var_dump
added at:
2023-02-06 09:56:13
2
-
PHP 8.1 / MySQL 5.7 number_format var_dump
added at:
2023-02-06 09:55:43
1