I Have A string that has got 2 links in it that are identical:
$str = '**** somewhere more text here .... **** somewhere';
im using Preg replace like this:
$str = preg_replace('/[/is','<a href="**?page**=-$1-**static-words**-$2.html">',$str);
this should echo the same on both links but it only changes the second link: output:
<a href="-randomtext-**static-words**-948191.html"> somewhere](#) more text here .... somewhere
However if i change the preg replace to this: $str = preg_replace('/[/is','<a href="**?page**=-$1-**testing-123**-$2.html">',$str);
the output changes to: <a href="-randomtext-**testing-123**-948191.html"> somewhere](#) more text here .... somewhere
what the hell is going on??? .... how can preg replace match the expression and yet only replace half of the string??