String segmentation and connection functions: Code: arrayexplode (stringdelimiter, stringdata) uses the string dellimiter to split data into an array and returns functions similar to: split () Code: stringimplode (arraydata, stringdellimiter)
String segmentation and connection functions:
Code:
Array explode (string delimiter, string data) uses the string dellimiter to split data into an array and return
Similar function: split () Code:
String implode (array data, string dellimiter) is opposite to explode (). It concatenates an array with dellimiter into a long string.
Function alias: join () Code:
Array split (string pattern, string text [, integer limit]) uses the matching pattern character as the separator and splits the string text into arrays.
Limit: an optional parameter that limits the number of segments to be separated. string codec function: Code:
String addslashes (string text) is returned by adding "" before special characters in string text. Special characters include ('),("),().
Similar function: quotemeta () Code:
The string stripslashes (string text) and addslashes () functions are the opposite. remove the backslash Encoding code:
String quotemeta (string text) is similar to addslashes (). The difference is that its special characters include:. + *? [] ^ () $ Code:
String escapeshellcmd (string command) adds a backslash before all characters that may cause trouble in shell commands.
Used before exec (), system (), and other functions. Code:
String mysql_escape_string (string text) escapes an SQL string to safely use the code for functions related to mysql_query () HTML:
String htmlentities (string text) converts all HTML entity codes:
String htmlspecialchars (string [, int quote_style [, string charset]) converts a specific character to an HTML entity
Quote_style: (ENT_COMPAT | ENT_QUOTES)
Quote_style default value: ENT_COMPAT conversion & <>
When quote_style is: ENT_QUOTES, in addition to converting the above characters, it also converts "and" code:
String trim (string text) removes the empty character code at the start and end of the string text:
String ltrim (string text) removes the empty character code at the beginning of the string text:
String rtrim (string text) removes the empty character code at the end of the string text:
Alias of the string chop (string text) function rtrim ()