note 33221 added to function.str-ireplace
| From: | jsvlrt at yahoo dot com | Date: | Thu, 19 Jun 2003 16:09:22 +0000 |
| Subject: | note 33221 added to function.str-ireplace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-50658@lists.php.net to get a copy of this message | ||
if you're using PHP < 5, you can use eregi_replace to perform this function, note, however
that this takes slightly longer as it's searching for regex strings, also, note the output from
the following code;
<?
$needle = "hello";
$haystack = "Hello World";
echo eregi_replace($needle,"<b>$needle</b>",$haystack);
?>
the output will be:
<b>hello</b> World
not
<b>Hello</b> World
anyone got any suggestions for this, maybe using a regex?
----
Manual Page -- http://www.php.net/manual/en/function.str-ireplace.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33221
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33221&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33221&report=yes