Welcome to the Linux community forum and interact with 2 million technicians to enter strim ($ str,); remove the special characters ltrim () left rtrim () Right addslashes ($ str) on both sides of the string ); automatically transfers the string. Use stripslashes ($ str) before adding a special string to the database.
Welcome to the Linux community forum and interact with 2 million technical staff> enter strim ($ str, ""); remove the special characters ltrim () on both sides of the string left rtrim () right addslashes ($ str); automatically transfers the string and adds "\" to the special string to use stripslashes ($ str) before inserting the database;
Welcome to the Linux community forum and interact with 2 million technicians>
Strim ($ str, ""); remove special characters on both sides of the string ltrim () left rtrim () Right
Addslashes ($ str); automatically transfers strings and adds "\" to special strings before database insertion.
Stripslashes ($ str); returns the escape string of the above function.
Addcslashes ($ str, "Special Character"); escape specific characters in a string, including Chinese Characters
Stripcslashes ($ str); escape Restoration
Strlen ($ str); get the length of the string
Substr ($ str, 1,-4); truncates a string, starting from the first string to the last Fourth
Strcmp ($ str1, $ str2); compares strings by byte. If the return value is equal to 0, 1> 2, the return value is greater than 0. Otherwise, the return value is less than 0.
Strnatcmp ($ str1, $ str2); compares the numbers in a string by natural sorting. The returned values are the same as the preceding values.
Strncmp ($ str1, $ str2, len); compares the first N characters in the string
Strstr ($ str, str); search string in string $ str find the substring strchr ($ str, str) at the position where str first appears at the end of the latter; search from the back
Substr_count ($ str, str); number of times a string appears
Str_ireplace ("original string", "changed string" $ str); replace character (Case Insensitive) str_replace () case sensitive
Explode ("@", $ str); split string
Implode ("@", $ str_arr); synthesize the string separated above