Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP FILTER_SANITIZE_STRIPPED Filter

PHP FILTER_SANITIZE_STRIPPED Filter


PHP Filter Reference Manual Complete PHP Filter Reference Manual


Definition and Usage

The FILTER_SANITIZE_STRIPPED filter removes or encodes unwanted characters.

This filter is an alias of the FILTER_SANITIZE_STRING filter

This filter removes data that is potentially harmful to your application. It is used to strip tags and remove or encode unwanted characters.

Possible options or flags:


Example

Peter Griffin"; var_dump(filter_var($var, FILTER_SANITIZE_STRIPPED)); ?>

The output of the code is shown below:

string(13) "Peter Griffin"


PHP Filter Reference Manual Complete PHP Filter Reference Manual