![]() |
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:
ucwords doesn't seem to fix that issue after I just used preg_replace. |
PHP Code:
|
Sweet, it worked. Thanks a lot for your help.
What does the $1 change to fix this? |
$1 says "just copy the first captured group into a variable called $1", which is the first reference of the captured group, so you don't have to copy and paste that expression every time you need to use it. Every groups that are captured (are between paranthesis), are numbered, in the order they match, starting from 1.
|
| All times are GMT. The time now is 05:30 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0