note 78560 added to function.strtolower
| From: | patricia at steuerungb dot de | Date: | Wed, 17 Oct 2007 13:29:29 +0000 |
| Subject: | note 78560 added to function.strtolower | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131453@lists.php.net to get a copy of this message | ||
When you're not sure, how the current locale is set, you might find the following function
useful. It's strtolower for utf8-formatted text:
<?php
function strtolower_utf8($inputString) {
$outputString = utf8_decode($inputString);
$outputString = strtolower($outputString);
$outputString = utf8_encode($outputString);
return $outputString;
}
?>
It's not suitable for every occasion, but it surely gets in handy. I use it for lowering German
'Umlauts' like ä and ö.
----
Server IP: 212.124.37.9
Probable Submitter: 80.142.171.27
----
Manual Page -- http://www.php.net/manual/en/function.strtolower.php
Edit -- https://master.php.net/note/edit/78560
Del: integrated -- https://master.php.net/note/delete/78560/integrated
Del: useless -- https://master.php.net/note/delete/78560/useless
Del: bad code -- https://master.php.net/note/delete/78560/bad+code
Del: spam -- https://master.php.net/note/delete/78560/spam
Del: non-english -- https://master.php.net/note/delete/78560/non-english
Del: in docs -- https://master.php.net/note/delete/78560/in+docs
Del: other reasons-- https://master.php.net/note/delete/78560
Reject -- https://master.php.net/note/reject/78560
Search -- https://master.php.net/manage/user-notes.php