Home » » iconv

iconv

Written By 1 on Sunday, September 30, 2012 | 9:38 AM

string iconv ( string $in_charset , string $out_charset , string $str )

Convert string to requested character encoding

Performs a character set conversion on the string str from in_charset to out_charset.


<?php
$text 
= "This is the Euro symbol '€'.";

echo 
'Original : ', $text, PHP_EOL;
echo 
'TRANSLIT : ', iconv("UTF-8", "ISO-8859-1//TRANSLIT", $text), PHP_EOL;
echo 
'IGNORE   : ', iconv("UTF-8", "ISO-8859-1//IGNORE", $text), PHP_EOL;
echo 
'Plain    : ', iconv("UTF-8", "ISO-8859-1", $text), PHP_EOL;

?>


Hướng dẫn cài đặt Xenforo hoàn chỉnh nhất

0 Comment:

Post a Comment