FILTER_SANITIZE_EMAIL
The id of this filter is 517. We can sanitize any variable with email address to remove unwanted chars including blank space. This function FILTER_SANITIZE_EMAIL removes all except letters, digits and {|}!#/=$%*[]+-?^_`~&'@. Here is an example$str='use= rid@example.com41!5~6+7'; // Change this value to get different result
$str = filter_var($str,FILTER_SANITIZE_EMAIL);
echo $str;
Output is hereuse=rid@example.com41!5~6+7
|
|
0 comments:
Post a Comment