note 20908 deleted from function.strtoupper by vincent

From: Date: Fri, 03 Oct 2003 11:04:40 +0000
Subject: note 20908 deleted from function.strtoupper by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-57690@lists.php.net to get a copy of this message
Note Submitter: admin@puremedia.ca ---- I'd just like to bring to the attention of editors that some weird thing happened to me while trying to upper-case some letters of a string. I did something like that inside a loop where a char-counter was increasing: $newchar=ord($string[$count])-32; $string[$count]=chr($newchar); In most cases, it worked out perfectly: turning the $count char of $string into its upper version. BUT at some time, it simply turned the whole $string into upper. I verified every single bit of my code before trying anything else but had to work on a copy of the variable to get through this. (ex: $str_cpy[$count]=$chr($newchar);) Don't know if it's normal or if it's a bug, but that f*cker surely taught me how to swear.

« previous php.notes (#57690) next »