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

PHP FILTER_SANITIZE_EMAIL Filter

PHP FILTER_SANITIZE_EMAIL Filter


PHP Filter Reference Manual Complete PHP Filter Reference Manual


Definition and Usage

The FILTER_SANITIZE_EMAIL filter removes all illegal e-mail characters from a string.

This filter allows all letters, digits, and $-_.+!*'{}|^~[]`#%/?@&=


Example

The output of the code is shown below:

string(19) "someone@example.com"


PHP Filter Reference Manual Complete PHP Filter Reference Manual