php man page for numfmt_format_currency

Query: numfmt_format_currency

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

NUMFMT_FORMAT_CURRENCY(3)						 1						 NUMFMT_FORMAT_CURRENCY(3)

NumberFormatter::formatCurrency - Format a currency value

	Object oriented style

SYNOPSIS
public string NumberFormatter::formatCurrency (float $value, string $currency)
DESCRIPTION
Procedural style string numfmt_format_currency (NumberFormatter $fmt, float $value, string $currency) Format the currency value according to the formatter rules.
PARAMETERS
o $fmt -NumberFormatter object. o $value - The numeric currency value. o $currency - The 3-letter ISO 4217 currency code indicating the currency to use.
RETURN VALUES
String representing the formatted currency value.
EXAMPLES
Example #1 numfmt_format_currency(3) example <?php $fmt = numfmt_create( 'de_DE', NumberFormatter::CURRENCY ); echo numfmt_format_currency($fmt, 1234567.891234567890000, "EUR")." "; echo numfmt_format_currency($fmt, 1234567.891234567890000, "RUR")." "; $fmt = numfmt_create( 'ru_RU', NumberFormatter::CURRENCY ); echo numfmt_format_currency($fmt, 1234567.891234567890000, "EUR")." "; echo numfmt_format_currency($fmt, 1234567.891234567890000, "RUR")." "; ?> Example #2 OO example <?php $fmt = new NumberFormatter( 'de_DE', NumberFormatter::CURRENCY ); echo $fmt->formatCurrency(1234567.891234567890000, "EUR")." "; echo $fmt->formatCurrency(1234567.891234567890000, "RUR")." "; $fmt = new NumberFormatter( 'ru_RU', NumberFormatter::CURRENCY ); echo $fmt->formatCurrency(1234567.891234567890000, "EUR")." "; echo $fmt->formatCurrency(1234567.891234567890000, "RUR")." "; ?> The above example will output: 1.234.567,89 EUR 1.234.567,89 RUR 1 234 567,89EUR 1 234 567,89.
SEE ALSO
numfmt_get_error_code(3), numfmt_format(3), numfmt_parse_currency(3). PHP Documentation Group NUMFMT_FORMAT_CURRENCY(3)
Related Man Pages
numfmt_create(3) - php
datefmt_get_locale(3) - php
msgfmt_set_pattern(3) - php
numfmt_get_attribute(3) - php
numfmt_set_symbol(3) - php
Similar Topics in the Unix Linux Community
How to add numbers?
add line numbers
compare realtime
How to handle one value below the other
Korn Shell manipulating the string into dynamic currency number