note 45813 deleted from function.strtolower by nlopess

From: Date: Fri, 18 Nov 2005 19:25:57 +0000
Subject: note 45813 deleted from function.strtolower by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-98771@lists.php.net to get a copy of this message
Note Submitter: jostor at gmail dot com ---- strtolower() does not change the swedish and german special chararchters. This simple script does that as well: <?php /* string swe_strtolower( string string ) */ function swe_strtolower($str) { $ar = array('å' => 'Å', 'ä' => 'Ä', 'ö' => 'Ö', 'ü' => 'Ü'); $str = strtolower($str); foreach ($ar as $key) { $str = str_replace($key, $ar, $str); } } /* string swe_strtoupper( string string ) */ function swe_strtoupper($str) { $ar = array('å' => 'Å', 'ä' => 'Ä', 'ö' => 'Ö', 'ü' => 'Ü'); $str = strtoupper($str); foreach ($ar as $key) { $str = str_replace($ar, $key, $str); } } ?>

« previous php.notes (#98771) next »