Bobo Wieland wrote: > Q1 :If I'm for example is going to replace all occurences of "foo" in > the following sentence with "bar" in case-insensetiv manner how would > I do it? > > "Foo foo foo Foo fOO fOo" should be replaced with "Bar bar bar > Bar bAR bAr"... > > I guess I would need regular expressions? Right?
hi, this should work. $barString = preg_replace('/foo/i', 'bar', $fooString); if you only want to match 'foo' but not foofoo, you have to use '/\Wfoo\W/i' ciao SVEN -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php