note 50883 deleted from function.strtoupper by hholzgra

From: Date: Thu, 02 Aug 2012 13:05:27 +0000
Subject: note 50883 deleted from function.strtoupper by hholzgra
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-189698@lists.php.net to get a copy of this message
Note Submitter: ---- 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.

« previous php.notes (#189698) next »