Phplocaleconv () function example-small_123

Source: Internet
Author: User
Tags define local
Phplocaleconv () function example-the small_123 php localeconv () function returns an array containing local numbers and currency format information. This article introduces the usage and basic instances of the php localeconv () function to the coders. For more information about the coders, see.

Definition and usage

The localeconv () function returns an array containing local numbers and currency format information.

The localeconv () function returns the following array elements:

  • [Decimal_point]-decimal point character
  • [Thousands_sep]-thousands separator
  • [Int_curr_symbol]-currency symbol (for example, USD)
  • [Currency_symbol]-currency symbol (for example, $)
  • [Mon_decimal_point]-decimal point character in currency
  • [Mon_thousands_sep]-currency thousands separator
  • [Positive_sign]-positive character
  • [Negative_sign]-negative value character
  • [Int_frac_digits]-universal international scale
  • [Frac_digits]-general local decimal places
  • [P_cs_precedes]-if the currency symbol is displayed before a positive value, it is True (1). if it is displayed after a positive value, it is False (0)
  • [P_sep_by_space]-if there is a space between the currency symbol and the positive value, True (1); otherwise, False (0)
  • [N_cs_precedes]-if the currency symbol is displayed before a negative value, it is True (1). if it is displayed after a negative value, it is False (0)
  • [N_sep_by_space]-True (1) If there is a space between the currency symbol and the negative value; otherwise, False (0)
  • [P_sign_posn]-formatting options:
    • 0-write the number and currency symbols in parentheses
    • 1-add a plus sign before the number and currency symbol
    • 2-add the plus sign after the number and currency symbol
    • 3-add a plus sign directly before the currency symbol
    • 4-add a plus sign directly after the currency symbol
  • [N_sign_posn]-formatting options:
    • 0-write the number and currency symbols in parentheses
    • 1-add the minus sign before the number and currency symbol
    • 2-add the minus sign after the number and currency symbol
    • 3-add the minus sign directly before the currency symbol
    • 4-add the minus sign directly after the currency symbol
  • [Grouping]-displays arrays in the form of a combination of numbers (for example, 3 indicates 1 000 000)
  • [Mon_grouping]-displays an array in the form of a combination of currency numbers (for example, 2 indicates 1 00 00)

Tip: to define local settings, see setlocale () function.

Tip: If you need to refer to all available language codes, please visit our language code reference manual.

Syntax

localeconv()

Technical details
Return value: Returns the current local data set by setlocale.
PHP version: 4.0.5 +

Instance

Find the number formatting information in the United States:

 

Online operation

Address: http://www.manongjc.com/article/817.html

Related reading:

Php setlocale () function sets region information (Region information)

Html web page lang language settings and reference

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.