note 41611 deleted from function.preg-match-all by nlopess

From: Date: Fri, 16 Apr 2004 18:08:53 +0000
Subject: note 41611 deleted from function.preg-match-all by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-68216@lists.php.net to get a copy of this message
Note Submitter: Noah Slater <nburnleyslater@yahoo.com> ---- UPDATE ########## There is a small bug in the code below. The function will not work unless there is at least ONE HTML tag in the search string. To solve this take the following block of code and "move it up a level"... i.e. take it out of it's parent if statement. <?php if($replaceFlag == true) { // Tag token $taggedString .= $startTag.$taggedTokens[0][$i]; $taggedString .= $endTag.$stringFragments[$i+1]; } else { // Do not tag token $taggedString .= $taggedTokens[0][$i]; $taggedString .= $stringFragments[$i+1]; } ?>

« previous php.notes (#68216) next »