Query: numfmt_parse_currency
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
NUMFMT_PARSE_CURRENCY(3) 1 NUMFMT_PARSE_CURRENCY(3) NumberFormatter::parseCurrency - Parse a currency number Object oriented styleSYNOPSISpublic float NumberFormatter::parseCurrency (string $value, string &$currency, [int &$position])DESCRIPTIONProcedural style float numfmt_parse_currency (NumberFormatter $fmt, string $value, string &$currency, [int &$position]) Parse a string into a double and a currency using the current formatter.PARAMETERSo $fmt -NumberFormatter object. o $currency - Parameter to receive the currency name (3-letter ISO 4217 currency code). o $position - Offset in the string at which to begin parsing. On return, this value will hold the offset at which parsing ended.RETURN VALUESThe parsed numeric value or FALSE on error.EXAMPLESExample #1 numfmt_parse_currency(3) example <?php $fmt = numfmt_create( 'de_DE', NumberFormatter::CURRENCY ); $num = "1.234.567,89xc2xa0$"; echo "We have ".numfmt_parse_currency($fmt, $num, $curr)." in $curr "; ?> Example #2 OO example <?php $fmt = new NumberFormatter( 'de_DE', NumberFormatter::CURRENCY ); $num = "1.234.567,89xc2xa0$"; echo "We have ".$fmt->parseCurrency($num, $curr)." in $curr "; ?> The above example will output: We have 1234567.89 in USDSEE ALSOnumfmt_get_error_code(3), numfmt_parse(3), numfmt_format_currency(3). PHP Documentation Group NUMFMT_PARSE_CURRENCY(3)
Related Man Pages |
---|
numfmt_create(3) - php |
numfmt_format_currency(3) - php |
numfmt_get_pattern(3) - php |
numfmt_set_attribute(3) - php |
numberformatter.gettextattribute(3) - php |
Similar Topics in the Unix Linux Community |
---|
Combinations |
webERP 3.09 (Default branch) |
QExchange 1.0.0 (Default branch) |
Regular expressions to check numbers with currency |
Korn Shell manipulating the string into dynamic currency number |