Search Results
Definition and Usage The strip_tags () function strips HTML and PHP tags from a string. Note: HTML comments are always stripped. This cannot be changed with the allow parameter. Note: This function is binary-safe.
Jul 11, 2025 · The strip_tags () function is an inbuilt function in PHP which is used to strips a string from HTML, and PHP tags. This function returns a string with all NULL bytes, HTML, and PHP tags stripped from a given $str.
In this tutorial, you'll learn how to use the PHP strip_tags() function to strip HTML and PHP tags from a string.
PHP strip_tags () Function Topic: PHP String Reference Prev | Next Description The strip_tags() function strips the HTML and PHP tags from a string. The following table summarizes the technical details of this function.
- Returns the stripped string.
- PHP 4+
Strip_tags () does not check HTML. PHP Version First introduced in core PHP 4, the strip_tags () function continues to function easily in PHP 5, PHP 7, and PHP 8. Example 1 Here is the basic example of the PHP String strip_tags () function to remove all HTML and PHP tags from a simple string.
People also ask
What is strip_tags() function in PHP?
How to strip HTML & PHP tags from a string?
What is strip_tags() function?
How do I strip a string from HTML tags?
Execute strip_tags Online. Info and examples on strip_tags PHP Function from Strings - Text Processing
