Re: Re: case-insensitive str_replace
| From: | Reuben D Budiardja | Date: | Thu, 02 May 2002 21:30:46 +0000 |
| Subject: | Re: Re: case-insensitive str_replace | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95766@lists.php.net to get a copy of this message | ||
On Thursday 02 May 2002 04:08 pm, J Smith wrote:
> preg_replace() can be used with arrays.
Yeah, but how to make it case-insensitive beside changing the my search and
replace strings to a regular expression? The problem is that I have a big
array for search and replace, and it would be most labourious to change them
to reg exp.
There should be something simpler and more elegant to do this.
Thanks.
Rdb
J
>
> Reuben D Budiardja wrote:
> >
> > The feature that I use in str_replace is to put the 'search' and
> > 'replace' argument as an array, as described in the documentation for php
> > >= 4.0.5 Some people suggested some functions in the archive and
> > documentation, but I cannot find anything that can receive arrays as the
> > arguments.
> >
> > So I am wondering if anyone has a function that is fully compatible with
> > str_replace for php > 4.0.5, but case-insensitive (something like
> > stri_replace). I don't really want to reinvent the wheel here.
> >
> > Thanks in advance.
> > Reuben D. Budiardja