case insensitive str_replace()

From: Date: Sun, 27 Aug 2000 18:17:15 +0000
Subject: case insensitive str_replace()
Groups: php.general 
Request: Send a blank email to php-general+get-13851@lists.php.net to get a copy of this message
How could I use str_replace for simple string replacement that is case insensitive? $txtHoldText = str_replace( '[h]', '<H3>', $txtHoldText ); is not the same as $txtHoldText = str_replace( '[H]', '<H3>', $txtHoldText ); I reied using strtolower() on the main text, but then of course the entire content of $txtHoldText is converted to lower case, which is not the desirable effect. thanx! Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion http://www.wizaerd.com =================================

« previous php.general (#13851) next »