Tag:for html code htm re ar
One, the string output
1, Echo () Direct output 2, print () and echo as direct output, but there will be a return value 0 1
3, printf () formatted output 4, sprintf () returns the formatted string
strlen () computes the length of the string
Two, go to space and fill the string function
1, ltirm () Remove a space from the left or a defined character 2, RTrim () remove a space from the right or a defined character
3, trim () remove a space from both ends of a string or a defined character
4, Str_pad () fill the string
Three, case conversion
1, Strtoupper () all converted to uppercase 2, Strtolower () all to lowercase
3, Ucfirst () uppercase 4, ucwords () characters separated by spaces first uppercase
Four, and HTML related
1. NL2BR () Replace \ n with <br>
2, Htmlspecialchars () turns HTML tags into entities (entities are not parsed by the navigator)
3, htmlentities () Converts all non-ASC characters to the corresponding entity code
4, addslashed () adds the necessary backslash
5, Strip_tags () before the required character "\" to delete all or the specified HTML tags
V, String substitution and delimited connections
1, str_replace () Replace 2, explode () delimited 3, implode () connection
This will of course have a preg regular correlation function, followed by
VI, other
1, Strrev () Reverses the string
2, Number_format () formats the number as the standard currency format
3, MD5 () MD5 encryption
4, string comparison strcmp () case-sensitive comparisons and strcasecmp ( Ignore the case comparison of letters