[PHP] Re: highlighting multi term search results

2003-09-08 Thread jonas_weber
Am Montag, 08.09.03 um 04:21 Uhr schrieb Lee O'Mara: Why not just allow for bold tags in the search term? What I mean is, I think you can get the results you want by allowing any number of open or close bold tags between each letter of the search term. i thought so too (but i had no idea how to

Re: [PHP] Re: highlighting multi term search results

2003-09-07 Thread Lee O'Mara
On Mon, 8 Sep 2003 00:11:09 +0200, Jonas_weber @ Gmx . Ch <[EMAIL PROTECTED]> wrote: Am Sonntag, 07.09.03 um 21:17 Uhr schrieb John W. Holmes: output: this is just a test (after the first term is highlighted the second one can't be found anymore.) but how to work around it?? Highlight the longe

[PHP] Re: highlighting multi term search results

2003-09-07 Thread jonas_weber
Am Sonntag, 07.09.03 um 21:17 Uhr schrieb John W. Holmes: output: this is just a test (after the first term is highlighted the second one can't be found anymore.) but how to work around it?? Highlight the longest words first? I don't think that would change anything. A search for "te est" then h

Re: [PHP] Re: highlighting multi term search results

2003-09-07 Thread John W. Holmes
[EMAIL PROTECTED] wrote: Am Sonntag, 07.09.03 um 14:11 Uhr schrieb Catalin Trifu output: this is just a test (after the first term is highlighted the second one can't be found anymore.) but how to work around it?? Highlight the longest words first? -- ---John Holmes... Amazon Wishlist: www.ama

[PHP] Re: highlighting multi term search results

2003-09-07 Thread jonas_weber
Am Sonntag, 07.09.03 um 14:11 Uhr schrieb Catalin Trifu <[EMAIL PROTECTED]>: Here the $result is changed to 'test' on the first search. Obviously on the second replace the term will not be found anymore! yes, it's obvious. like i said: output: this is just a test (after the first term is

[PHP] Re: highlighting multi term search results

2003-09-07 Thread Catalin Trifu
Hi, > function highlight($src_terms, $src_terms_int, $result) { > $i = 0; >while ($i < $src_terms_int) { >$result = preg_replace('/('.$src_terms[$i].')/si', > ''.$src_terms[$i].'', $result); Here the $result is changed to 'test' on the first search. Obviously on the second rep