Are there any specific guidelines or recommendations for excluding HTML code from text manipulation in PHP?

When manipulating text in PHP, it is important to exclude HTML code to prevent any unintended effects on the output. One way to achieve this is by using the `strip_tags()` function, which removes any HTML and PHP tags from a string.

$text = "<p>This is a <strong>sample</strong> text with HTML tags.</p>";
$clean_text = strip_tags($text);
echo $clean_text;