String to lower with swedish characters åäö

This is how you can convert upper case characters/letters to lower case even if they contain swedish characters.

<?php
function mymodule_stringtolower($string) {
   
$search  = array ('/Å/','/Ä/','/Ö/');
   
$replace = array ('å','ä','ö');
   
$string = preg_replace($search, $replace, $string);
   
$string = strtolower($string);
   
    return
$string;
}
?>
Knowledge keywords: