I have to replace any link in string to specify variable. I have a code
$intro = $this->item->introtext;
this code retrun me for example this
<p style="text-align: center;">
<a href="/upload/dzialanosc-spoleczna/Mikolajki-w-Dabiu-2012/MG_0187.jpg">
<img width="700" height="467" alt="" src="/upload/dzialanosc-spoleczna/Mikolajki-w-Dabiu-2012/MG_0187s.jpg">
</a>
</p>
I have to replace this anchor href by own variable (new generated link) for example $link