We all know that.Example code for PHP filtering strings:
- < ? PHP
- NL2BR ();
- //N to <br/>
- Addslashes (); Stripslashes ();
- Escape special characters when working against a database
- Chop ();
- Remove the right space from the string
- Trim ();
- Remove all spaces in a string
- LTrim ();
- Remove the left space of a string
- Htmlspecialchars ();
- //Convert ' $ ', ' ' ', ' < ',' > ' for the corresponding HTML entity
- Htmlentities ();
- Convert all HTML tags to the appropriate HTML entity
- Array explode (string separator, string str);
- Split string
- String implode (string separator, array arr);
- Connection string
- Strtoupper (); Strtolower ();
- Convert case
- Ucfirst ();
- Convert only the first character to uppercase
- Ucwords ();
- Convert the first letter of each words to uppercase
- ?>
I hope that this article introduces the PHP filter string method can be in-depth grasp this point of knowledge.
http://www.bkjia.com/PHPjc/446234.html www.bkjia.com true http://www.bkjia.com/PHPjc/446234.html techarticle We all know the code example of PHP filtering string: Php nl2br ();//nto br/addslashes (); stripslashes ();//When operating on a database, Escape special characters chop ();//Remove string right ...