I have a string such as
Hey.<br>
<a href="http://www.cool.com" target="_self">Check it. it's cool</a>
What i want to do, is to replace that with
Check it. it's cool (http://www.cool.com)
The problem is, that in the tags, i dont know what order the different href, target, onclick, etc. things will be on. Also, there may be a lot of these in the string. How can i accomplish this, hopefully with preg_replace or something of the sort.