replace
| From: | blackwater dev | Date: | Fri, 28 Jan 2005 15:22:38 +0000 |
| Subject: | replace | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-207598@lists.php.net to get a copy of this message | ||
I have a section of my site that uses HTMLArea to allow the users to
manage content. For one certain section, they want all of their links
to pop up in another window. I know they can use HTMLArea and add
this code themselves but they don't want to get to the code side of
it.
Currently, I just pull out the entire contents and echo them to the screen:
echo $sql->getField('content');
but now I need to replace each anchor tag from
<A href="http://www.something.com/">
to
<A href="javascript:pop('http://www.something.com/')">
I can easily use str_replace() to replace "<a href="javascript:pop( "
but how do I add the last )?
Hope this made sense.
Thanks!