Re: Highlighting search results ???

From: Date: Thu, 18 Oct 2001 11:24:51 +0000
Subject: Re: Highlighting search results ???
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-13467@lists.php.net to get a copy of this message
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 <strong>keyword</strong>" =dn PS haven't coded it to see > or you could do something like > str_replace(strtolower($search_term), "<b>$search_term</b>", > strtolower($matched_string)); > > > > // -----Original Message----- > // From: Boget, Chris [mailto:Chris.Boget@wild.net] > // Sent: Thursday, 18 October 2001 2:57 AM > // To: 'Chris Payne'; DL Neil; php-db@lists.php.net > // 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: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.db (#13467) next »