RE: [PHP] Matching irregular cases

From: Date: Wed, 17 Jan 2001 15:57:00 +0000
Subject: RE: [PHP] Matching irregular cases
Groups: php.general 
Request: Send a blank email to php-general+get-35057@lists.php.net to get a copy of this message
Steve, Try the ereg_replace()somthing like this: eregi_replace($search_query, "<b>$search_query</b>", $row[6]); Robert W. Collins Web Developer II Insight / TC Computers www.insight.com www.tccomputers.com -----Original Message----- From: jalist [mailto:jalist@ls2k.org] Sent: Wednesday, January 17, 2001 8:47 AM To: php-general@lists.php.net Subject: [PHP] Matching irregular cases I think this'll be an easy one for you fellas... I'm writing a search function for my site. The code to search the mysql db's are in place and working but here's the problem. For any matches that are displayed, I want to change the search query so it stands out in the result list. I'm just using... ereg_replace($search_query, "<b>$search_query</b>", $row[6]); ...at the moment, but it wont match results where the case doesn't match. Ie if the search query is "blah", the mysql search will return both "blah" and "Blah" but the ereg_replace will only add the <b> tag to the "blah" result, not the "Blah" one. Thanks in advance. Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#35057) next »