FILTER_SANITIZE_SPECIAL_CHARS

It Escapes special characters like &,< etc

Example
======

<?php
print_r(filter_var(“PHPCodez & Me”,FILTER_SANITIZE_SPECIAL_CHARS));
?>

Output
=====

PHPCodez & Me (If you take view source , it will be PHPCodez &#38; Me)

Leave a Reply

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