library/Garp/Util/String.php
static public function scrambleEmail($email, $mailTo = false) {
        for ($i = 0, $c = strlen($email), $out = ''; $i < $c; $i++) {
            $out .= '&#' . ord($email[$i]) . ';';
        }
        if ($mailTo) {
            $out = self::scrambleEmail('mailto:') . $out;
        }
        return $out;
    }
static public function scrambleEmail($email, $mailTo = false) {
        for ($i = 0, $c = strlen($email), $out = ''; $i < $c; $i++) {
            $out .= '&#' . ord($email[$i]) . ';';
        }
        if ($mailTo) {
            $out = self::scrambleEmail('mailto:') . $out;
        }
        return $out;
    }
static public function scrambleEmail ( $ email , $ mailTo = false ) { for ( $ i = 0 , $ c = strlen ( $ email ) , $ out = '' ; $ i < $ c ; $ i ++ ) { $ out .= '&#' . ord ( $ email [ $ i ] ) . ';' ; } if ( $ mailTo ) { $ out = self :: scrambleEmail ( 'mailto:' ) . $ out ; } return $ out ; }
Output email address as entities

@param string $email
@param boolean $mailTo Wether to append "mailto:" for embedding in <a href="">
@return string
Output email address as entities