note 30946 added to function.strtoupper
| From: | dnlzsy at yahoo dot com | Date: | Fri, 04 Apr 2003 04:28:02 +0000 |
| Subject: | note 30946 added to function.strtoupper | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46202@lists.php.net to get a copy of this message | ||
chinese
function to_upper($string) {
$new_string = "";
$i = 0;
while($i < strlen($string)) {
if (ord(substr($string,$i,1)) <128)
{
$new_string .= strtoupper(substr($string,$i,1));
} else {
$new_string .= substr($string,$i,1);
}
$i++;
}
return $new_string;
}
--
http://www.php.net/manual/en/function.strtoupper.php
http://master.php.net/manage/user-notes.php?action=edit+30946
http://master.php.net/manage/user-notes.php?action=delete+30946
http://master.php.net/manage/user-notes.php?action=reject+30946