note 86090 added to function.str-ireplace

From: Date: Thu, 02 Oct 2008 17:32:11 +0000
Subject: note 86090 added to function.str-ireplace
Groups: php.notes 
Request: Send a blank email to php-notes+get-144991@lists.php.net to get a copy of this message
Sorry, I made a misstake at the code example below. Example for str_ireplace(). It will print "RePlaCeMe" in red color, but after this, it would be written in lower case because of the string $search. <?php $search = 'replaceme'; $replace = '<font color="#FF0000">'.$search.'</font>'; $text = 'Please RePlaCeMe, OK?'; echo str_ireplace($search, $replace, $text); ?> Example for ext_str_ireplace(). It will print "RePlaCeMe" in red color, and will not change the capitalization: <?php $search = 'replaceme'; $replace = '<font color="#FF0000">$1</font>'; $text = 'Please RePlaCeMe, OK?'; echo ext_str_ireplace($search, $replace, $text); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 87.165.206.183 ---- Manual Page -- http://www.php.net/manual/en/function.str-ireplace.php Edit -- https://master.php.net/note/edit/86090 Del: integrated -- https://master.php.net/note/delete/86090/integrated Del: useless -- https://master.php.net/note/delete/86090/useless Del: bad code -- https://master.php.net/note/delete/86090/bad+code Del: spam -- https://master.php.net/note/delete/86090/spam Del: non-english -- https://master.php.net/note/delete/86090/non-english Del: in docs -- https://master.php.net/note/delete/86090/in+docs Del: other reasons-- https://master.php.net/note/delete/86090 Reject -- https://master.php.net/note/reject/86090 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#144991) next »