MyBB-Plugins Forums

Full Version: str_replace
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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


I didn't understand your issue very clear. Please try to explain it better.
i wont replace all "twist" in message but not in url and image links
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.