note 41611 added to function.preg-match-all
| From: | NoahSlater | Date: | Fri, 16 Apr 2004 15:24:16 +0000 |
| Subject: | note 41611 added to function.preg-match-all | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-68210@lists.php.net to get a copy of this message | ||
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];
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.preg-match-all.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41611
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41611&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41611&report=yes
Search -- http://master.php.net/manage/user-notes.php