Php removes html tags to obtain the input plain text document strip_tags
- $ Text ='
Test paragraph. Other text ';
- Echo strip_tags ($ text );
- Echo "\ n ";
-
- // Allow
- Echo strip_tags ($ text ,'
');
- ?>
-
In the preceding example, Test paragraph. Other text is output. Test paragraph. Other textArticles you may be interested in: php: two ways to remove html tags php: remove excessive HTML tags php uses strip_tags to completely remove all html tags example of how php filters html tags using strip_tags) php: three methods for deleting html tags: php: code for deleting html tags from html tags and code for deleting html tags from strings: php: multiple methods for obtaining html webpage content removing html tag code in content extracting php tags code example for php regular expression filtering html tags, spaces, line breaks, etc. php enables HTML tags to automatically complete closed function code php to Implement html tag auto-completion code thinkPHP Html template tag usage method |