PX : code

maskEmail by jan
Rating: 3.00
Download this code


<?php
function maskEmail($email)
{
    
$me '';    
    
$length strlen($email);    

    for (
$i 0$i $length$i++) {
        
$me .= "&#".ord($email[$i]).";"
    }

    return 
$me;
}

$me maskEmail("you@example.com");
echo 
'<a href="mailto:'.$me.'">'.$me.'</a>';
?>

Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.