PHP string function library

Source: Internet
Author: User
PHP string function library, read PHP string function library, PHP string function library, and collect 51 PHP string processing functions. The PHP string function library collects 51 PHP string processing functions. Including calculating the length of a string, splitting a string, and searching for a string. AddSlashes: Adds a slash to the string. Bin2hex: binary to 10 "> <LINKhref =" ht

The PHP string function library collects 51 PHP string processing functions.
The PHP string function library collects 51 PHP string processing functions.

Including calculating the length of a string, splitting a string, and searching for a string.


AddSlashes: Adds a slash to the string.
Bin2hex: binary to hexadecimal.
Chop: removes consecutive gaps.
Chr: returns the character of the ordinal value.
Chunk_split: splits a string into segments.
Convert_cyr_string: convert the ancient Slavic string to another string.
Crypt: encrypt the string with DES encoding.
Echo: output string.
Explode: cut string.
Flush: clears the output buffer.
Get_meta_tags: extracts all metadata marked by meta from the file.
Htmlspecialchars: Convert Special characters into HTML format.
Htmlentities: converts all characters into HTML strings.
Implode: converts an array into a string.
Join: converts an array into a string.
Ltrim: removes consecutive white spaces.
Md5: calculate the MD5 of the string.
Nl2br: convert line breaks
.
Ord: returns the ordinal value of a character.
Parse_str: parses the query string into a variable.
Print: output string.
Printf: output the formatted string.
Quoted_printable_decode: convert an qp encoded string to an 8-bit string.
QuoteMeta: add a reference symbol.
Rawurldecode: restores a string from a URL-specific format to a normal string.
Rawurlencode: encode a string into a URL-specific format.
Setlocale: configure the region information.
Similar_text: string similarity calculation.
Soundex: calculates the pronunciation of a string.
Sprintf: format the string.
Strchr: find the first occurrence character.
Strcmp: string comparison.
Strcspns: the length of different strings.
Strip_tags: removes HTML and PHP tags.
StripSlashes: removes the backslash.
Strlen: Gets the string length.
Strrpos: find the last occurrence of a character in the string.
Strpos: searches for the first occurrence of a character in a string.
Strrchr: Gets the string starting from the last occurrence of a character.
Strrev: Reverse string.
Strspns: identifies the number of masks that a string falls into another string.
Strstr: returns the string from the beginning to the end of a string.
Strtok: cut string.
Strtolower: converts all strings to lowercase letters.
Strtoupper: converts all strings to uppercase.
Str_replace: string replacement.
Strtr: converts certain characters.
Substr: obtains some strings.
Trim: removes spaces at the beginning and end of a string.
Ucfirst: uppercase for the first character of the string.
Ucwords: change the first letter of each character in the string to uppercase.

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.