In PHP, replace one URL with another within a string e.g.
New post on the site <a href="http://stackoverflow.com/xyz1">http://stackoverflow.com/xyz1</a></p>
becomes:
New post on the site <a href="http://yahoo.com/abc1">http://yahoo.com/abc1</a></p>
Must work for repeating strings as above. Appreciate this is simple but struggling!