note 94599 added to function.strtoupper
| From: | [gsguma] at osu1 dot php dot net | Date: | Fri, 13 Nov 2009 14:50:39 +0000 |
| Subject: | note 94599 added to function.strtoupper | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-162870@lists.php.net to get a copy of this message | ||
<?php
/* converte UTF8 corrigindo acentos e cedilhas minusculos */
function case_utf8($str,$case='+'){
$str = utf8_decode($str);
switch($case)
{
case "+" :
default:
$str=strtoupper($str);
break;
case "-" :
$str = strtolower($str);
break;
}
$str = utf8_encode($str);
return $str;
}
/* converte UTF8 corrigindo acentos e cedilhas minusculos */
?>
Ex:
<?php
case_utf8("string"); //maiuculas
case_utf8("string","-"); //minusculas
?>
----
Server IP: 69.147.83.197
Probable Submitter: 201.86.243.155
----
Manual Page -- http://www.php.net/manual/en/function.strtoupper.php
Edit -- https://master.php.net/note/edit/94599
Del: integrated -- https://master.php.net/note/delete/94599/integrated
Del: useless -- https://master.php.net/note/delete/94599/useless
Del: bad code -- https://master.php.net/note/delete/94599/bad+code
Del: spam -- https://master.php.net/note/delete/94599/spam
Del: non-english -- https://master.php.net/note/delete/94599/non-english
Del: in docs -- https://master.php.net/note/delete/94599/in+docs
Del: other reasons-- https://master.php.net/note/delete/94599
Reject -- https://master.php.net/note/reject/94599
Search -- https://master.php.net/manage/user-notes.php