PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
n00b Saibot
DevNet Resident
Posts: 1452 Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:
Post
by n00b Saibot » Fri Oct 13, 2006 10:39 pm
just change the regex...
this will match the img tags. if you need to replace it with something just feed it to the preg_replace function
tristanlee85
Forum Contributor
Posts: 172 Joined: Fri Dec 19, 2003 7:28 am
Post
by tristanlee85 » Fri Oct 13, 2006 10:41 pm
Well, since I want to remove the images fron the signature, I figure I'd replace it with nothing, like so:
Code: Select all
$user_sig = preg_replace('#<img[^>]+>#is','',$user_sig);
Correct?
n00b Saibot
DevNet Resident
Posts: 1452 Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:
Post
by n00b Saibot » Fri Oct 13, 2006 10:42 pm
just try
tristanlee85
Forum Contributor
Posts: 172 Joined: Fri Dec 19, 2003 7:28 am
Post
by tristanlee85 » Fri Oct 13, 2006 10:46 pm
Heh, works perfectly.
Once again, thank you all.