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 $sanitizedMessage = filter_var($message, FILTER_SANITIZE_STRING); echo $sanitizedMessage; ?>
<?php // Sample user comment $message = "<p>This is Test Message..</p>"; // Sanitize and print comment string $sanitizedMessage = filter_var($message, FILTER_SANITIZE_STRING); echo $sanitizedMessage; ?>
No comments:
Post a Comment