[PHP] ereg_replace all items in a array

2001-01-29 Thread Joseph H Blythe
G'day PHP'ers I am trying highlight the results from a search, so far I have this working but only if the string is an exact match ie: case sensitive, for example: ?php $keywords = "foo"; $data = "This is a lower foo. This is an upper FOO. This is a ucase Foo"; $lower = strtolower($keywords);

Re: [PHP] ereg_replace all items in a array

2001-01-29 Thread Jeff Warrington
In article [EMAIL PROTECTED], "Joseph H Blythe" [EMAIL PROTECTED] wrote: What is happening is that you are replacing the variable $replaced on each iteration of the while loop. As a result, $replaced is only storing the most recent match. To see this, try this out: $keywords = "foo"; $data =