How to use FILTER SANITIZE STRIPPED in PHP
This article describe about FILTER_SANITIZE_STRIPPED filter in PHP.
FILTER_SANITIZE_STRIPPED filter
For filter strips or encodes unwanted characters use FILTER_SANITIZE_STRIPPED.
It is an alias of the FILTER_SANITIZE_STRING filter.
Harmful data for your application removed by this filter. This filter used strip tags and remove or encode unwanted characters.
- Name: "stripped"
- ID-number: 513
Possible options and flags:
- FILTER_FLAG_ENCODE_LOW - Encode characters with ASCII value below 32
- FILTER_FLAG_ENCODE_HIGH - Encode characters with ASCII value above 32
- FILTER_FLAG_ENCODE_AMP - Encode the & character to &
- FILTER_FLAG_NO_ENCODE_QUOTES - This flag does not encode quotes
- FILTER_FLAG_STRIP_LOW - Strip characters with ASCII value below 32
- FILTER_FLAG_STRIP_HIGH - Strip characters with ASCII value above 32
Example
<html>
<body>
<?php
$var="<b>shoan jamesleen<b>";
var_dump(filter_var($var, FILTER_SANITIZE_STRIPPED));
?>
</body>
</html> |
Output

You may also want to read these related articles Click here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here