Converting danish characters to uppercase in PHP

Here's a snippet of code that helps you convert a string that might contain danish characters to uppercase:

<?php
function toUpper($string) { 
    return (strtoupper(strtr($string, 'æøå','ÆØÅ' ))); 
}; 
?>

Enjoy. :-)


Written by Jannich Brendle søn 07 november 2010 In Programming

tags: phpyukugly hack

social