' is the corresponding html entity htmlentities();//convert all ht"/> ' is the corresponding html entity htmlentities();//convert all ht">
Home > Article > Backend Development > JS intercepts strings. Several useful PHP string filtering and conversion function codes
nl2br();// n to
addslashes(); stripslashes();//When operating on the database, escape special characters
chop();//Remove the space on the right side of the string
trim();//Remove the string All spaces in
ltrim();//Remove the spaces on the left side of the string
htmlspecialchars();//Convert '$','"','<','>' to the corresponding html entities
htmlentities(); //Convert all html tags to corresponding html entities
array explode(string separator, string str); //Split the string
string implode(string separator, array arr); //Connect the string
strtoupper(); strtolower( );//Convert uppercase to lowercase
ucfirst();//Convert only the first character to uppercase
ucwords();//Convert the first letter of each word to uppercase
The above introduces several useful PHP string filtering and conversion function codes for intercepting strings with js, including content on intercepting strings with js. I hope it will be helpful to friends who are interested in PHP tutorials.