note 50883 added to function.strtoupper

From: Date: Sun, 13 Mar 2005 01:08:47 +0000
Subject: note 50883 added to function.strtoupper
Groups: php.notes 
Request: Send a blank email to php-notes+get-86341@lists.php.net to get a copy of this message
Ah, the last code were spoiled, here is the fixed one: <?php function str_to_upper($str){ return strtr($str, "abcdefghijklmnopqrstuvwxyz". "\x9C\x9A\xE0\xE1\xE2\xE3". "\xE4\xE5\xE6\xE7\xE8\xE9". "\xEA\xEB\xEC\xED\xEE\xEF". "\xF0\xF1\xF2\xF3\xF4\xF5". "\xF6\xF8\xF9\xFA\xFB\xFC". "\xFD\xFE\xFF", "ABCDEFGHIJKLMNOPQRSTUVWXYZ". "\x8C\x8A\xC0\xC1\xC2\xC3\xC4". "\xC5\xC6\xC7\xC8\xC9\xCA\xCB". "\xCC\xCD\xCE\xCF\xD0\xD1\xD2". "\xD3\xD4\xD5\xD6\xD8\xD9\xDA". "\xDB\xDC\xDD\xDE\x9F"); } ?> So, this function changes also other letters into uppercase, strtoupper() does only change: a-z to: A-Z. ---- Manual Page -- http://www.php.net/manual/en/function.strtoupper.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50883 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50883&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50883&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50883&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50883&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50883&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50883&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#86341) next »