| | #1 | ||
| Active Warrior Join Date: 2010
Posts: 58
Thanks: 2
Thanked 1 Time in 1 Post
|
Hi guys, below are simple replacing script a word in to another word, or censorship PHP Code: the problem its currently also replacing another words like
please help how to make it only replacing exact words? GBU for all that answering | ||
|
I like forum
| |||
| |
| | #2 |
| Active Warrior War Room Member Join Date: 2013
Posts: 48
Thanks: 0
Thanked 9 Times in 9 Posts
| PHP Code: |
| |
| | #3 |
| Web Designer Join Date: 2013
Posts: 70
Thanks: 0
Thanked 19 Times in 18 Posts
| PHP Code: |
| |
| | #4 |
| Active Warrior Join Date: 2010
Posts: 58
Thanks: 2
Thanked 1 Time in 1 Post
|
thank you Nathan for replying, already tried like this, but its get error like this PHP Code: |
|
I like forum
| |
| |
| | #5 |
| Active Warrior Join Date: 2010
Posts: 58
Thanks: 2
Thanked 1 Time in 1 Post
|
thank you for replying softwarewarden, its works if the words in the middle of text, its simple way, but not works if the words in the front or back, like this PHP Code: |
|
I like forum
| |
| |
| | #6 |
| Web Designer Join Date: 2013
Posts: 70
Thanks: 0
Thanked 19 Times in 18 Posts
|
The reason it did not work is because of your php version. try this PHP Code: googleg*oglegoogle yahooyah*oyahoo Because your first requirement is not to replace words like "googler" and in your second requirement is replace words like "googler". If you want to replace all the words remove the two '\b's in $exp. |
| |
|
| Bookmarks |
| Tags |
| exact, php, replacing, words |
| |