note 61599 deleted from function.preg-replace by colder
| From: | colder@php.net | Date: | Mon, 18 Jun 2007 19:58:35 +0000 |
| Subject: | note 61599 deleted from function.preg-replace by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127684@lists.php.net to get a copy of this message | ||
Note Submitter: jsirovic at gmale dot com
----
If the lack of &$count is aggravating in PHP 4.x, try this:
$replaces = 0;
$return .= preg_replace('/(\b' . $substr . ')/ie',
'"<$tag>$1<$end_tag>" . (substr($replaces++,0,0))', $s2, $limit);