Friday, January 28, 2005

PHP: Accents in Email Subject


function encode_iso88591($string){
$text = '=?iso-8859-1?q?';
for( $i = 0 ; $i < strlen($string) ; $i++ ){
$val = ord($string[$i]);
$val = dechex($val);
$text .= '='.$val;
}
$text .= '?=';
return $text;
}

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home