Thread: preg_replace
View Single Post
Old 08-22-2008, 04:22 AM   #1 (permalink)
Jako
The Wanderer
 
Join Date: Jun 2005
Posts: 21
Thanks: 1
Jako is on a distinguished road
Default preg_replace

Quick question...

I got preg_replace working how I wanted when used in a search query.

So the variable is bolded in the returned results.

PHP Code:
$name preg_replace "'($query)'is" "<b>$query</b>" $row'player_last' ] );
        
$name =  ucwords($name); 
Issue is, if I search for "ja", Jako would be returned as jako instead of Jako.

ucwords doesn't seem to fix that issue after I just used preg_replace.
Jako is offline  
Reply With Quote