This repository has been archived on 2022-02-10. You can view files and clone it, but cannot push or open issues or pull requests.
rangitaki/res/umlautconverter.php
2015-02-24 23:05:30 +01:00

15 lines
No EOL
472 B
PHP

<?php
class UmlautConverter
{
function convert($text)
{
$output = str_replace("ä","&auml;",$text);
$output = str_replace("Ä","&Auml;",$output);
$output = str_replace("ö","&ouml;",$output);
$output = str_replace("Ö","&Ouml;",$output);
$output = str_replace("ü","&uuml;",$output);
$output = str_replace("Ü","&Uuml;",$output);
$output = str_replace("ß","&szlig;",$output);
return $output;
}
}