php man page for numfmt_parse

Query: numfmt_parse

OS: php

Section: 3

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

NUMFMT_PARSE(3) 							 1							   NUMFMT_PARSE(3)

NumberFormatter::parse - Parse a number

	Object oriented style

SYNOPSIS
public mixed NumberFormatter::parse (string $value, [int $type], [int &$position])
DESCRIPTION
Procedural style mixed numfmt_parse (NumberFormatter $fmt, string $value, [int $type], [int &$position]) Parse a string into a number using the current formatter rules.
PARAMETERS
o $fmt -NumberFormatter object. o $type - The formatting type to use. By default, NumberFormatter::TYPE_DOUBLE is used. o $position - Offset in the string at which to begin parsing. On return, this value will hold the offset at which parsing ended.
RETURN VALUES
The value of the parsed number or FALSE on error.
EXAMPLES
Example #1 numfmt_parse(3) example <?php $fmt = numfmt_create( 'de_DE', NumberFormatter::DECIMAL ); $num = "1.234.567,891"; echo numfmt_parse($fmt, $num)." "; echo numfmt_parse($fmt, $num, NumberFormatter::TYPE_INT32)." "; ?> Example #2 OO example <?php $fmt = new NumberFormatter( 'de_DE', NumberFormatter::DECIMAL ); $num = "1.234.567,891"; echo $fmt->parse($num)." "; echo $fmt->parse($num, NumberFormatter::TYPE_INT32)." "; ?> The above example will output: 1234567.891 1234567
SEE ALSO
numfmt_get_error_code(3), numfmt_format(3), numfmt_parse_currency(3). PHP Documentation Group NUMFMT_PARSE(3)
Related Man Pages
numfmt_get_text_attribute(3) - php
numfmt_parse_currency(3) - php
numfmt_set_pattern(3) - php
numfmt_set_symbol(3) - php
numberformatter.gettextattribute(3) - php
Similar Topics in the Unix Linux Community
PHP help
Search and Parse string from inside a File
print ODD lines
Parse ; deliminated variable to create variables
Specific string parsing in Linux/UNIX