Để chuyển font Nokia sang font dạng UTF-8, bạn sử dụng code để thực hiện việc chuyển:
Cách dùng: echo cvnokia($biến);
Leech: NhanhNao.Mobi
PHP:
function cvnokia($text) {
$nokia=array(
'á','ả','à' ,'ã','ạ','ắ','ẳ','ằ','ẵ','ặ',
'ấ','ẩ','ầ','ẫ','ậ','é','ẻ','è','ẽ','ẹ',
'ế','ể','ề','ễ','ệ','ó','ỏ','ò','õ','ọ',
'ố','ổ','ồ','ỗ','ộ','ớ','ở','ờ','ỡ','ợ',
'ú','ủ','ù','ũ','ụ','ứ','ử','ừ','ữ','ự',
'ý','ỷ','ỳ','ỹ','ỵ','í','ỉ','ì','ĩ','ị',
'Á','Ả','À','Ã','Ạ','Ắ','Ẳ','Ằ','Ẵ','Ặ',
'Ấ','Ẩ','Ầ','Ẫ','Ậ','É','Ẻ','È','Ẽ','Ẹ',
'Ế','Ể','Ề','Ễ','Ệ','Ó','Ỏ','Ò','Õ','Ọ',
'Ố','Ổ','Ồ','Ỗ','Ộ','Ớ','Ở','Ờ','Ỡ','Ợ',
'Ú','Ủ','Ù','Ũ','Ụ','Ứ','Ử','Ừ','Ữ','Ự',
'Ý','Ỷ','Ỳ','Ỹ','Ỵ','Í','Ỉ','Ì','Ĩ','Ị'
);
// Bài viết được viết tại NhanhNao.Mobi
$pc=array(
'á','ả','à' ,'ã','ạ','ắ','ẳ','ằ','ẵ','ặ',
'ấ','ẩ','ầ','ẫ','ậ','é','ẻ','è','ẽ','ẹ',
'ế','ể','ề','ễ','ệ','ó','ỏ','ò','õ','ọ',
'ố','ổ','ồ','ỗ','ộ','ớ','ở','ờ','ỡ','ợ',
'ú','ủ','ù','ũ','ụ','ứ','ử','ừ','ữ','ự',
'ý','ỷ','ỳ','ỹ','ỵ','í','ỉ','ì','ĩ','ị',
'Á','Ả','À','Ã','Ạ','Ắ','Ẳ','Ằ','Ẵ','Ặ',
'Ấ','Ẩ','Ầ','Ẫ','Ậ','É','Ẻ','È','Ẽ','Ẹ',
'Ế','Ể','Ề','Ễ','Ệ','Ó','Ỏ','Ò','Õ','Ọ',
'Ố','Ổ','Ồ','Ỗ','Ộ','Ớ','Ở','Ờ','Ỡ','Ợ',
'Ú','Ủ','Ù','Ũ','Ụ','Ứ','Ử','Ừ','Ữ','Ự',
'Ý','Ỷ','Ỳ','Ỹ','Ỵ','Í','Ỉ','Ì','Ĩ','Ị'
);
$text = str_replace($nokia, $pc, $text);
return $text;
}
Cách dùng: echo cvnokia($biến);
Leech: NhanhNao.Mobi