08-22-2008, 04:22 AM
|
#1 (permalink)
|
|
The Wanderer
Join Date: Jun 2005
Posts: 21
Thanks: 1
|
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.
|
|
|
|