私がéを置き換えると、それはéに変わります。 PHPとHTMLでUTF-8エンコーディングを使用しています。私は関数に、関数に入れた文字のHTMLコードを返すようにします。PHPの特殊文字が関数を置き換えます
function ctrlspecialchars($subject){
$search = array("<",">","é","à","â","ä","æ","ç","è","ê","ë","ï","î","ò","ó","ô","ö","ø","ù","ú","û","ü","©","®","«","»","¼","½","¾","±","§","¥","£","{","}","$","%");
$replace = array("<",">","é","à","â","ä","æ","ç","è","ê","ë","ï","î","ò","ó","ô","ö","ø","ù","ú","û","ü","©","®","«","»","¼","½","¾","±","§","¥","£","{","}","$","%");
return str_replace($search,$replace,$subject);
}
疑問符アイコンが表示されますか? – user2879055
é - >これらの兆候。私は文字でéを書式で送信しましたが、置き換え機能を使用すると正しい文字が得られます...しかし、私はthaを置き換えたい – FreeSpirit
...しかし、その文字を - >&#233; まだデータベースに保存されていません。 – FreeSpirit