Re: [PHP] Battling with highlighting search criteria

2002-11-04 Thread Michael Sims
On Mon, 4 Nov 2002 11:59:20 +0200, you wrote: >Ok, this works. > >Just one more thing, > >How can I get the return in the same case as it was originally? Use backreferences to capture what matched and use that in the replace string. Example: $1", $str); echo $str; echo ""; $str = "Is this als

Re: [PHP] Battling with highlighting search criteria

2002-11-04 Thread rija
$result = eregi_replace("($search)","\\0",$result) ; I use it, and I work fine for me. - Original Message - From: "David Russell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 04, 2002 7:27 PM Subject: [PHP] Battling with highlighting search criteria > Hi there, >

Re: [PHP] Battling with highlighting search criteria -solution

2002-11-04 Thread Justin French
ager > Barloworld Optimus (Pty) Ltd > Tel: +2711 444-7250 > Fax: +2711 444-7256 > e-mail: [EMAIL PROTECTED] > web: www.BarloworldOptimus.com > > -Original Message- > From: Justin French [mailto:justin@;indent.com.au] > Sent: 04 November 2002 12:49 PM > To:

Re: [PHP] Battling with highlighting search criteria

2002-11-04 Thread Justin French
www.BarloworldOptimus.com > > -Original Message- > From: Justin French [mailto:justin@;indent.com.au] > Sent: 04 November 2002 12:49 PM > To: David Russell > Subject: Re: [PHP] Battling with highlighting search criteria > > > Yeap, you need a regexp... >

RE: [PHP] Battling with highlighting search criteria

2002-11-04 Thread David Russell
7250 Fax: +2711 444-7256 e-mail: [EMAIL PROTECTED] web: www.BarloworldOptimus.com -Original Message- From: Justin French [mailto:justin@;indent.com.au] Sent: 04 November 2002 12:49 PM To: David Russell Subject: Re: [PHP] Battling with highlighting search criteria Yeap, you need

Re: [PHP] Battling with highlighting search criteria

2002-11-04 Thread Justin French
how are you doing it for only the FIRST??? Anyhoo, a simple string replace should do it... I'd do this: $result = str_replace($search,"{$search}",$result); Justin on 04/11/02 6:27 PM, David Russell ([EMAIL PROTECTED]) wrote: > Hi there, > > My brain has just gone very fuzzy... > > I have a