Quote:
Originally Posted by nexialys
case-insensitive is explained in the preg_replace page...:
http://ca.php.net/manual/en/function.preg-replace.php
preg_replace ("/myWord/i", "myotherword", $thissentence);
...
and is quicker than str-replace in all situations...
... i never used the replacement thing in the templates, i find that really annoying,because it's template based, so filter all the output, not only the text you post.. annoying!
this one will be performing good!!!
|
Hey nex, the problem is i don't know how to add the / / i in there using variables. I tried"
PHP Code:
$code = preg_replace("/" . $text . "/i", $replacetext, $code);
But that doesn't work, anyone have any ideas?