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.2.13 / MySQL 8.0 Sakila (ReadOnly) gettype number_format
last run:
2024-01-12 06:48:39
6
- PHP 8.1 / MySQL 5.7 number_format microtime
last run:
2022-05-18 07:56:49
6
- PHP 8.1 / PostgreSQL 10 Bookings (ReadOnly) number_format rand
last run:
2024-07-06 13:35:02
4
- PHP 8.1 / MySQL 5.7 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 explode count preg_match_all number_format
last run:
2024-05-01 15:05:05
3
- 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
number_format - New snippets
-
PHP 8.1 / MySQL 5.7 number_format
added at:
2024-07-19 06:50:58
1
-
PHP 8.1 / MySQL 5.7 number_format
added at:
2024-07-19 06:50:43
1
-
PHP 8.1 / MySQL 5.7 number_format
added at:
2024-07-19 06:49:33
1
-
PHP 8.1 / MySQL 5.7 number_format
added at:
2024-07-19 06:49:27
1
-
PHP 8.1 / MySQL 5.7 number_format
added at:
2024-07-19 06:48:50
1
-
PHP 8.1 / MySQL 5.7 number_format
added at:
2024-07-19 06:48:19
1
-
PHP 8.1 / PostgreSQL 10 Bookings (ReadOnly) number_format rand
added at:
2024-07-06 13:32:36
4
-
PHP 8.1 / PostgreSQL 10 Bookings (ReadOnly) number_format rand
added at:
2024-07-06 13:32:23
1
-
PHP 8.1 / PostgreSQL 10 Bookings (ReadOnly) number_format rand
added at:
2024-07-06 13:32:01
1
-
PHP 8.1 / PostgreSQL 10 Bookings (ReadOnly) number_format rand
added at:
2024-07-06 13:31:52
1