FILTER_SANITIZE_STRING

Strip tags and encode special characters.

Example
======

<?php
print_r(htmlentities(filter_var(“<font>PHPCodez<font>”, FILTER_SANITIZE_STRING)));
?>

Output
=====

PHPCodez

Share

Leave a Reply

Your email address will not be published. Required fields are marked *