note 68069 added to function.ereg-replace

From: Date: Wed, 12 Jul 2006 07:43:18 +0000
Subject: note 68069 added to function.ereg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-114706@lists.php.net to get a copy of this message
Watch out when you use it for highlighting text. It is case sensitive. <?php $textvar = "testTesttest"; $searchstring = "test"; $highlight = ereg_replace($searchstring, "<span class=\"highlight\">".$searchstring."</span>", $textvar); ?> Highlights like this: [text]Text[text] The matching word with not matching case isn't parsed. ---- Server IP: 212.124.37.9 Probable Submitter: 80.140.97.57 (proxied: unknown) ---- X-Spam-Status: No, hits=3.3 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HTML_MESSAGE autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.ereg-replace.php Edit -- http://master.php.net/note/edit/68069 Del: integrated -- http://master.php.net/note/delete/68069/integrated Del: useless -- http://master.php.net/note/delete/68069/useless Del: bad code -- http://master.php.net/note/delete/68069/bad+code Del: spam -- http://master.php.net/note/delete/68069/spam Del: non-english -- http://master.php.net/note/delete/68069/non-english Del: in docs -- http://master.php.net/note/delete/68069/in+docs Del: other reasons-- http://master.php.net/note/delete/68069 Reject -- http://master.php.net/note/reject/68069 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#114706) next »