I need help turning something like:
<img class="coup-pic" src="http://example.com/img/pic.jg" alt="" />
into:
<a href="http://example.com/img/pic.jg"><img class="coup-pic" src="http://example.com/img/pic.jg" alt="" /></a>
I need to be able to dynamically search for a string like the one above using PHP and wrap it in an a tag with the src attribute used as the a tag. I think I'll need to use preg_replace, but I do not know the right regex to use.
Thanks for the help!