Advertisement
Guest User

Bleed - Foro 2.0

a guest
May 24th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.35 KB | None | 0 0
  1. function email($mail,$nombre=null){
  2.     if (empty($mail)) return null;
  3.     $mailascii = '';
  4.     for($x=0,$y=strlen($mail);$x<$y;$x++){
  5.         if($x%2 OR $mail{$x}=='@'){
  6.             $mailascii .= '&#'.ord($mail{$x}).';';
  7.         }else{
  8.             $mailascii .= $mail{$x};
  9.         }
  10.     }
  11.     return '<a href="m&#97;i&#108;t&#111;:'.$mailascii.'">'.(isset($nombre)?$nombre:$mailascii).'</a>';
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement