- function nohtml ($content)
- {
- $content = Preg_replace ("/]*>/i", "', $content);
- $content = Preg_replace ("/<\/a>/i", "', $content);
- $content = Preg_replace ("/]*>/i", "', $content);
- $content = Preg_replace ("/<\/div>/i", "', $content);
- $content = Preg_replace ("/]*>/i", "', $content);
- $content = Preg_replace ("/<\/font>/i", "', $content);
- $content = Preg_replace ("/ ]*>/i", "', $content);
- $content = Preg_replace ("/<\/p>/i", "', $content);
- $content = Preg_replace ("/ ]*>/i", "', $content);
- $content = Preg_replace ("/<\/span>/i", "', $content);
- $content = Preg_replace ("/<\?xml[^>]*>/i", "', $content);
- $content = Preg_replace ("/<\/\?xml>/i", "', $content);
- $content = Preg_replace ("/ ]*>/i", "', $content);
- $content = Preg_replace ("/<\/o:p>/i", "', $content);
- $content = Preg_replace ("/ ]*>/i", "', $content);
- $content = Preg_replace ("/<\/u>/i", "', $content);
- $content = Preg_replace ("/ ]*>/i", "', $content);
- $content = Preg_replace ("/<\/b>/i", "', $content);
- $content = Preg_replace ("/ ]*>/i", "', $content);
- $content = Preg_replace ("/<\/meta>/i", "', $content);
- $content = Preg_replace ("//I ", "', $content);//comment content
- $content = Preg_replace ("/ ]*-->/i", "', $content);//comment content
- $content = Preg_replace ("/style=.+?[" | \ "]/i", ", $content);//Remove style
- $content = Preg_replace ("/class=.+?[" | \ "]/i", ", $content);//Remove style
- $content = Preg_replace ("/id=.+?[" | \ "]/i", ", $content);//Remove style
- $content = Preg_replace ("/lang=.+?[" | \ "]/i", ", $content);//Remove style
- $content = Preg_replace ("/width=.+?[" | \ "]/i", ", $content);//Remove style
- $content = Preg_replace ("/height=.+?[" | \ "]/i", ", $content);//Remove style
- $content = Preg_replace ("/border=.+?[" | \ "]/i", ", $content);//Remove style
- $content = Preg_replace ("/face=.+?[" | \ "]/i", ", $content);//Remove style
- $content = Preg_replace ("/face=.+?[" | \ "]/", ", $content);
- $content = Preg_replace ("/face=.+?[" | \ "]/", ", $content);
- $content =str_replace ("", "", $content);
- return $content;
- }
Copy Code>>> you may be interested in the article: PHP Delete HTML tag code PHP determine whether the string contains HTML tags extract HTML tags PHP code sample PHP method of extracting HTML tags PHP two ways to remove HTML tags PHP Remove redundant HTML tags PHP is looking for HTML tags that contain ID attributes in HTML PHP with STRIP_ Tags complete removal of all instances of HTML tags share php delete HTML tags three ways to share PHP delete HTML tags and strings in the HTML tags of the code PHP delete string HTML tags in the function of extracting HTML tags PHP code PHP regular filter HTML tags, Code examples for spaces, line breaks, etc. fix HTML tags that are not properly closed (supports nesting and closing close) code for PHP to remove HTML tags to get input plain text document strip_tagsphp HTML tag auto complement closed function code PHP implementation HTML Tag Auto-complete |