Filters
number_format
Introduction
The number_format
filter is used to format numbers according to a specific number of decimal places, thousands separators, and decimal separators. It is useful for displaying numeric values in a standardized way, such as prices or quantities, in a user-friendly interface.
Example of use
Example of how to use the number_format
filter to format a number with two decimal places, using a comma as the thousands separator and a dot as the decimal separator: