• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

[PHP] Code chuyển font Nokia sang UTF-8

Thaoxnet

New Member
Để chuyển font Nokia sang font dạng UTF-8, bạn sử dụng code để thực hiện việc chuyển:
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
 

Facebook Comments

New posts New threads New resources

Back
Top