So I have this:
$variable = "
HTML,HTML,HTML
<a href="index.php?id=whatever">Link</a>
<a href="index.php?id=whatever2">Link 2</a>
<a href="index.php?id=whatever3">Link 3</a>
";
What I want to do is replace all occurrences of "index.php" with "http://www.mydomain.com/index.php" and leave everything else as it is...
is there any way to do that?
so basically, the code above would be transformed into:
$variable = "
HTML,HTML,HTML
<a href="http://www.mydomain.com/index.php?id=whatever">Link</a>
<a href="http://www.mydomain.com/index.php?id=whatever2">Link 2</a>
<a href="http://www.mydomain.com/index.php?id=whatever3">Link 3</a>
";
THANKS!