Hướng dẫn PHP

TRANG CHỦ PHP Giới thiệu PHP Cài đặt PHP Cú pháp PHP Nhận xét PHP Các biến PHP PHP Echo / Print Các kiểu dữ liệu PHP Chuỗi PHP Số PHP Toán PHP Hằng số PHP Toán tử PHP PHP If ... Else ... Elseif Chuyển đổi PHP Vòng lặp PHP Các hàm PHP Mảng PHP PHP Superglobals PHP RegEx

Biểu mẫu PHP

Xử lý biểu mẫu PHP Xác thực biểu mẫu PHP Yêu cầu biểu mẫu PHP URL biểu mẫu PHP / E-mail Hoàn thành biểu mẫu PHP

PHP nâng cao

Ngày và giờ trong PHP Bao gồm PHP Xử lý tệp PHP Mở / Đọc tệp PHP Tạo / ghi tệp PHP Tải lên tệp PHP Cookie PHP Phiên PHP Bộ lọc PHP Bộ lọc PHP nâng cao Các chức năng gọi lại trong PHP PHP JSON Ngoại lệ PHP

PHP OOP

PHP OOP là gì Các lớp / đối tượng PHP Trình tạo PHP PHP Destructor Công cụ sửa đổi quyền truy cập PHP Kế thừa PHP Hằng số PHP Các lớp trừu tượng trong PHP Giao diện PHP Đặc điểm PHP Phương thức tĩnh trong PHP Thuộc tính tĩnh của PHP Không gian tên PHP Lặp lại PHP

Cơ sở dữ liệu MySQL

Cơ sở dữ liệu MySQL MySQL Connect MySQL Tạo cơ sở dữ liệu MySQL Tạo bảng MySQL Chèn dữ liệu MySQL Nhận ID cuối cùng MySQL Chèn Nhiều MySQL được chuẩn bị Dữ liệu chọn MySQL MySQL ở đâu MySQL Đặt hàng bởi MySQL Xóa dữ liệu Dữ liệu cập nhật MySQL Dữ liệu giới hạn MySQL

PHP XML

Trình phân tích cú pháp XML PHP Trình phân tích cú pháp PHP SimpleXML PHP SimpleXML - Nhận PHP XML Expat DOM XML PHP

PHP - AJAX

Giới thiệu về AJAX AJAX PHP Cơ sở dữ liệu AJAX AJAX XML Tìm kiếm trực tiếp AJAX Cuộc thăm dò ý kiến ​​của AJAX

Ví dụ về PHP

Ví dụ về PHP Trình biên dịch PHP PHP Quiz Bài tập PHP Chứng chỉ PHP

Tham chiếu PHP

Tổng quan về PHP Mảng PHP Lịch PHP Ngày PHP Thư mục PHP Lỗi PHP Ngoại lệ PHP Hệ thống tập tin PHP Bộ lọc PHP FTP PHP PHP JSON Từ khóa PHP PHP Libxml Thư PHP Toán PHP PHP Misc PHP MySQLi Mạng PHP Kiểm soát đầu ra PHP PHP RegEx PHP SimpleXML Luồng PHP Chuỗi PHP Xử lý biến PHP Trình phân tích cú pháp XML PHP PHP Zip Múi giờ PHP

Hàm nl_langinfo () trong PHP


❮ Tham chiếu chuỗi PHP

Định nghĩa và Cách sử dụng

Hàm nl_langinfo () trả về thông tin cục bộ cụ thể.

Lưu ý: Chức năng này không hoạt động trên nền tảng Windows.

Mẹo: Không giống như hàm localeconv () , trả về tất cả thông tin định dạng cục bộ, hàm nl_langinfo () trả về thông tin cụ thể.


Cú pháp

nl_langinfo(element)

Giá trị tham số

Parameter Description
element Required. Specifies which element to return. Must be one of the following elements:

Time and Calendar:

  • ABDAY_(1-7) - Abbreviated name of the numbered day of the week
  • DAY_(1-7) - Name of the numbered day of the week (DAY_1 = Sunday)
  • ABMON_(1-12) - Abbreviated name of the numbered month of the year
  • MON_(1-12) - Name of the numbered month of the year
  • AM_STR - String for Ante meridian
  • PM_STR - String for Post meridian
  • D_T_FMT - String that can be used as the format string for strftime() to represent time and date
  • D_FMT - String that can be used as the format string for strftime() to represent date
  • T_FMT - String that can be used as the format string for strftime() to represent time
  • T_FMT_AMPM - String that can be used as the format string for strftime() to represent time in 12-hour format with ante/post meridian
  • ERA - Alternate era
  • ERA_YEAR - Year in alternate era format
  • ERA_D_T_FMT - Date and time in alternate era format (string can be used in strftime())
  • ERA_D_FMT - Date in alternate era format (string can be used in strftime())
  • ERA_T_FMT - Time in alternate era format (string can be used in strftime())

Monetary Category:

  • INT_CURR_SYMBOL - Currency symbol (example: USD)
  • CURRENCY_SYMBOL - Currency symbol (example: $)
  • CRNCYSTR - Same as CURRENCY_SYMBOL
  • MON_DECIMAL_POINT - Monetary decimal point character
  • MON_THOUSANDS_SEP - Monetary thousands separator
  • POSITIVE_SIGN - Positive value character
  • NEGATIVE_SIGN -Negative value character
  • MON_GROUPING - Array displaying how monetary numbers are grouped (example: 1 000 000)
  • INT_FRAC_DIGITS - International fractional digits
  • FRAC_DIGITS - Local fractional digits
  • P_CS_PRECEDES - True (1) if currency symbol is placed in front of a positive value, False (0) if it is placed behind
  • P_SEP_BY_SPACE - True (1) if there is a spaces between the currency symbol and a positive value, False (0) otherwise
  • N_CS_PRECEDES - True (1) if currency symbol is placed in front of a negative value, False (0) if it is placed behind
  • N_SEP_BY_SPACE - True (1) if there is a spaces between the currency symbol and a negative value, False (0) otherwise
  • P_SIGN_POSN - Formatting setting. Possible return values:
    • 0 - Parentheses surround the quantity and currency symbol
    • 1 - The sign string is placed in front of the quantity and currency symbol
    • 2 - The sign string is placed after the quantity and currency symbol
    • 3 - The sign string is placed immediately in front of the currency symbol
    • 4 - The sign string is placed immediately after the currency symbol
  • N_SIGN_POSN - Formatting setting. Possible return values:
    • 0 - Parentheses surround the quantity and currency symbol
    • 1 - The sign string is placed in front of the quantity and currency symbol
    • 2 - The sign string is placed after the quantity and currency symbol
    • 3 - The sign string is placed immediately in front of the currency symbol
    • 4 - The sign string is placed immediately after the currency symbol

Numeric Category:

  • DECIMAL_POINT - Decimal point character
  • RADIXCHAR - Same as DECIMAL_POINT
  • THOUSANDS_SEP - Separator character for thousands
  • THOUSEP - Same as THOUSANDS_SEP
  • GROUPING - Array displaying how numbers are grouped (example: 1 000 000)

Messaging Category:

  • YESEXPR - Regex string for matching 'yes' input
  • NOEXPR - Regex string for matching 'no' input
  • YESSTR - Output string for 'yes'
  • NOSTR - Output string for 'no'

Code set Category:

  • CODESET Return a string with the name of the character encoding.

Chi tiết kỹ thuật

Giá trị trả lại: Trả về thông tin cụ thể về thành công hoặc FALSE về thất bại.
Phiên bản PHP: 4.1.0+

❮ Tham chiếu chuỗi PHP