MyBB-Plugins Forums
str_replace - Printable Version

+- MyBB-Plugins Forums (
+-- Forum: MyBB General Discussion (
+--- Forum: Coding Help (
+--- Thread: str_replace (/Thread-str-replace)

str_replace - Supryk - 01-28-2015


I have something like that

PHP Code:
$message str_replace(' twist'' <a href="">Twist</a>'$message); 

why this code replace twist in this message, i dont wont replace in links and img


RE: str_replace - Diogo Parrinha - 01-28-2015


I didn't understand your issue very clear. Please try to explain it better.

RE: str_replace - Supryk - 01-29-2015

i wont replace all "twist" in message but not in url and image links

RE: str_replace - Diogo Parrinha - 01-29-2015

Well, you'll need to use preg_replace to do that. You need to use a regular expression to replace in all entries BUT urls and images.