ローマ数字文字化け


str_replaceで
$hage = mb_convert_encoding($hage, “EUC-JP”, “auto”);

$hage = str_replace(“Ⅰ”, “I”, $hage);
$hage = str_replace(“Ⅱ”, “II”, $hage);
$hage = str_replace(“Ⅲ”, “III”, $hage);
$hage = str_replace(“Ⅳ”, “IV”, $hage);
$hage = str_replace(“Ⅴ”, “V”, $hage);
$hage = str_replace(“Ⅵ”, “VI”, $hage);
$hage = str_replace(“Ⅶ”, “VII”, $hage);
$hage = str_replace(“Ⅷ”, “VIII”, $hage);
$hage = str_replace(“Ⅸ”, “IX”, $hage);
$hage = str_replace(“Ⅹ”, “X”, $hage);

カテゴリー: php, WEBメモ   パーマリンク

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

*

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <img localsrc="" alt="">