Home>Article>Backend Development> How to convert php gbk utf8
php gbk utf8 conversion method: 1. Use [iconv("UTF-8", "gbk//TRANSLIT",$str);] to convert utf8 to gbk; 2. Use [iconv( 'GB2312','UTF-8',$str);】Convert to utf8.
Recommended: "PHP Video Tutorial"
php utf8 and gbk conversion
utf8 to gbk
'; echo iconv("UTF-8","gbk//TRANSLIT",$str); //将字符串的编码从UTF-8转到GB2312
gbk to utf8
'; echo iconv('GB2312', 'UTF-8', $str); //将字符串的编码从GB2312转到UTF-8
The above is the detailed content of How to convert php gbk utf8. For more information, please follow other related articles on the PHP Chinese website!