php remove html tags
<?php
$text = '<p>Test paragraph.</p><!-- Comment --> <a href="#fragment">Other text</a>';
echo strip_tags($text);
//Test paragraph. Other text
// Allow <p> and <a>
echo strip_tags($text, '<p><a>');
//<p>Test paragraph.</p> <a href="#fragment">Other text</a>
// as of PHP 7.4.0 the line above can be written as:
// echo strip_tags($text, ['p', 'a']);
?>
echo strip_tags("Hello <b>world!</b>");
Also in HTML:
- foundation dropdown direction
- html set input type date to disable previous dates
- how to put an image in html
- html zeilenumbruch
- how to add lines between div rows html
- html href to gmail
- vue toggle class
- input html
- how to add a paragraph in html
- html boilerplate vscode
- how to make a html login
- html form select
- ionic progress bar
- how to scrool some photos in html
- embed youtube video auto height
- html input default value
- HTML Image full screen width
- Finding HTML Elements
- bootstrap 4 icons
- center header html
- html create a multi-line text input
- how to make a signup page in html
- video and audio tag in html
- sort by value map