class og $this preg_replace_callback()
Hvordan kan jeg bruge $this-> under preg_replace_callback()"\$this->quoted_printable_encode_character"
<?php
if(!class_exists("emaillib")) {
class emaillib {
function quoted_printable_encode_character($strMatches) {
$strCharacter = $strMatches[0];
return sprintf("=%02x", ord($strCharacter));
}
function quoted_printable_encode($strHtml) {
$strHtml = preg_replace_callback("/[^\x21-\x3C\x3E-\x7E\x09\x20]/",
"\$this->quoted_printable_encode_character", $strHtml);
return preg_replace("/(.{73}[^=]{0,3})/", "$1"."=\r\n", $strHtml);
}
}
}
?>
