What function in PHP can be used to remove HTML tags from a string?

To remove HTML tags from a string in PHP, you can use the `strip_tags()` function. This function takes a string as input and returns the string with all HTML tags removed. It can be useful when you want to display user-generated content as plain text without any formatting.

$string_with_html = "<p>This is a <b>sample</b> text with <a href='#'>HTML</a> tags.</p>";
$clean_string = strip_tags($string_with_html);
echo $clean_string;