mysql - How to convert E5%AE%89%E5%85%A8 to this format 安全 in PHP 5.1 -
i got keyword var url this:
search.php?keyword=%e5%ae%89%e5%85%a8 with utf8 encoding. want convert keyword format:
安全
so can use in mysql/php/
how can achieve this?
this should work.
$html = mb_convert_encoding($_get['keyword'], 'html-entities', 'utf-8'); echo htmlspecialchars($html); //安全
Comments
Post a Comment