Re: [PHP-DB] Highlighting search results ???

2001-10-18 Thread DL Neil

Was thinking along these lines, but wouldn't it change the appearance of the keyword 
in some case-situations?
eg "here is your KeyWord" would become "here is your keyword"
=dn
PS haven't coded it to see


> or you could do something like
> str_replace(strtolower($search_term), "$search_term",
> strtolower($matched_string));
> 
> 
> 
> // -Original Message-
> // From: Boget, Chris [mailto:[EMAIL PROTECTED]]
> // Sent: Thursday, 18 October 2001 2:57 AM
> // To: 'Chris Payne'; DL Neil; [EMAIL PROTECTED]
> // Subject: RE: [PHP-DB] Highlighting search results ???
> // 
> // 
> // > A question though, it brings back the results only if they 
> // > match the case in the database.  Example, if someone enters 
> // > planet in the  search engine, it brings back all results with 
> // > planet AND Planet in (Which is good), but when I do the bold 
> // > replacement bit it only replaces the case they enter in the
> // > search box.  If they enter planet, ONLY planet is bold and 
> // > not Planet or anything else - is there a way to deal with this?
> // 
> // Look into eregi_replace() or a similar function.
> // 
> // Chris
> // 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Highlighting search results ???

2001-10-17 Thread Tomy Wagner

str_replace("MATCHING WORD", "MATCHING WORD");

Tomy Wagner
Web Developer
Editus Luxembourg S.A.

- Original Message -
From: "Chris Payne" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 17, 2001 8:05 PM
Subject: [PHP-DB] Highlighting search results ???


Hi there everyone,

I'm becoming regular on here hehehe :-)

I have my search engine working great (Abit like Google) but how do I
highlight in the results the keywords I searched for?  This is a must for my
search engine.

Thank you for your help in the past (And more than likely in the future
hehehe :-)

Regards

Chris Payne
[EMAIL PROTECTED]
http://www.planetoxygene.com



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]