<?php
$bchars=array(
"\xe2\x80\x98", // left single quote
"\xe2\x80\x99", // right single quote
"\xe2\x80\x9c", // left double quote
"\xe2\x80\x9d", // right double quote
"\xe2\x80\x94", // em dash
"\xe2\x80\xa6" // elipses
);
$fchars=array(
"‘",
"’",
'“',
'”',
'—',
'…'
);
$html=str_replace($bchars,$fchars,$html);
?>
You can get more code of utf 8 idea on below URL: https://www.php.net/manual/en/function.utf8-decode.php
Comments
Post a Comment