Re: str_ireplace
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: str_ireplace

From: Tobierre <No-Reply@hotmail.com>
Date: Tue Oct 25 2005 - 20:15:51 CEST

Hi why don't you just do the following to get the same result?

$var = strtolower$var); //convert string to lower case
str_ireplace(..., $var);

if you don't want to convert the original string just do

$var = 'SomE STrinG';

$testvar = strtolower($var);
$str_ireplace(..., $testvar);

Tobierre

"windandwaves" <winandwaves@coldmail.com> wrote in message
news:H8X6f.2140$S24.150355@news.xtra.co.nz...
> Does anyone know of a function that works like str_ireplace in PHP < 5?
>
> str_ireplace(a,b,c) replaces a with b in c, just like str_replace, but
> case insensitive.
>
> TIA
>
> - Nicolaas
>
Received on Mon Nov 21 02:49:56 2005