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

[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: " . $val . ""; $replaced = ereg_replace($val, $hilite, $data); } echo $replaced; ?> Now as metioned this seems to work only for "