1. String output function
Echo
Print
No echo high efficiency, not recommended
Die ()
Exit and print the string A, you can also die directly
Printf
formatting strings
sprintf
Returns a formatted string
2. Commonly used string formatting functions
LTrim ()
Delete the left blank
RTrim
Delete the blank on the right
Trim
Remove white space on both sides
Str_pad
Fills a string with another string for a specified length
Strtolower
Convert a string to lowercase
Strtopper
Convert a string to uppercase
Ucfirst
Converts the first letter of a string to uppercase
Usword
Converts the first letter of each word in a string to uppercase
Nl2br
Inserts an HTML wrap tag before all new lines in the string
Htmlentities
Entity turns into a label
Htmlspecialchars
Label turns into entity
Stripslashes
Remove backslashes
Strip_taps
Delete a label
Md5
Password encryption
3. String comparison function
strcmp (A, B)
Sort by byte, if a is less than b, a negative number is returned, if a is greater than B, a positive number is returned, and the two equals returns 0.
STRCASECMP ()
Ditto, but not case-sensitive
STRNATCMP ()
Sort by natural number
The above describes the string processing function, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.