HTML Codes - Special Characters UTF-8

Characters for Specific Languages: German - Slovenian

<?phpfunction numCodeAscii($subject) {$numCode = array(
      ö=>&#246;,
      Ö=>&#214;,
      ü=>&#252;,
      Ü=>&#220;,
      ß=>&#223;,
      š=>&#353;,
      Š=>&#352;,
      č=>&#269;,
      Č=>&#268;,
      ž=>&#382;,
      Ž=>&#381;
      );      return str_replace(array_keys($numCode),array_values($numCode),$subject);}
echo $string = šŠčČžŽöÖüÜ;echo numCodeAscii($string);?>