Possible Duplicate:
regex to wrap img tag with href containg the src
as topic stands - i want to convert all imgages in links based on those images
so:
<img src="http://xxx.xxx/image.jpg"> or <img src="/image.jpg">
<- on local images
converts to:
<a href="http://xxx.xxx/image.jpg"><img src="http://xxx.xxx/image.jpg"></a>
in php
any tips?