In SANITIZE string we can remove extra tag like <p>, <h1> ect..Example are give below..
<?php // Sample user comment $message = "<p>This is Test Message..</p>"; // Sanitize and print comment string $sanitizedComment = filter_var($message, FILTER_SANITIZE_STRING); echo $sanitizedComment; ?>
<?php // Sample user comment $message = "<p>This is Test Message..</p>"; // Sanitize and print comment string $sanitizedComment = filter_var($message, FILTER_SANITIZE_STRING); echo $sanitizedComment; ?>