11-01-2009, 08:51 PM
|
#3 (permalink)
|
|
The Wanderer
Join Date: Aug 2009
Posts: 17
Thanks: 0
|
You could use your function and then use a regular expression to remove all the <acronym> tags that appear inside <a> tags.
Here is a regular expression I have come up with. I have only tested it using a javascript regexp tester at http://www.regular-expressions.info/...ptexample.html
It should be the same for PHP though:
PHP Code:
$the_content = preg_replace('~(<a.*>)<acronym.*>(.*)</acronym>(</a>)~i', '$1$2$3', $the_content);
Let me know how you get on.
|
|
|
|