Created
February 10, 2017 05:56
-
-
Save phpfiddle/7cbf97f92e0f472282f2f277618366e4 to your computer and use it in GitHub Desktop.
[ Posted by Fiddler ] Encode email address - Github
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Encode email | |
* | |
*/ | |
function encode_email($e) { | |
$output = ''; | |
for ($i = 0; $i < strlen($e); $i++) { $output .= '&#'.ord($e[$i]).';'; } | |
return $output; | |
} | |
echo encode_email("myaddress@gmail.com"); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment