PHP FILTER_SANITIZE_EMAIL Filter
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 $-_.+!*'{}|^~[]`#%/?@&=
- Name: "email"
- ID-number: 517
Example
The output of the code is shown below:
string(19) "someone@example.com"
Complete PHP Filter Reference Manual