View Single Post
  #1  
Old 08-09-2006, 12:54 PM
strings strings is offline
Junior Member
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
strings is on a distinguished road
Cool matching strings

Hi

I am trying to figure out if this is at all possible.

When a user searches for a certain string, it replaces the string with bold text, and I accomplished that by doing this:

PHP Code:
//$query = 'DEV'
str_replace($query, '<b>'.$query.'</b>', $results);
//return <b>DEV</b>
//doesn't return <b>Dev</b>

However, if they search for DEV, it will just bold the results that are in all caps, and I am trying for it to return anything that matches DEV, lower or upper case.

What gives??
Bye -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - matching strings
View Single Post
  #1  
Old 08-09-2006, 12:54 PM
strings strings is offline
Junior Member
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
strings is on a distinguished road
Cool matching strings

Hi

I am trying to figure out if this is at all possible.

When a user searches for a certain string, it replaces the string with bold text, and I accomplished that by doing this:

PHP Code:
//$query = 'DEV'
str_replace($query, '<b>'.$query.'</b>', $results);
//return <b>DEV</b>
//doesn't return <b>Dev</b>

However, if they search for DEV, it will just bold the results that are in all caps, and I am trying for it to return anything that matches DEV, lower or upper case.

What gives??
Bye -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote