The FILTER_SANITIZE_EMAIL constant deletes all illegal characters from an email address.
Return
The FILTER_SANITIZE_EMAIL constant does not return anything.
Example
<?php $myemail = "abc@demo//.com"; $myemail = filter_var($myemail, FILTER_SANITIZE_EMAIL); echo $myemail; ?>
Output
The following is the output.
[email protected]