We parse our HTML as PHP.
All of internal links within any HTML page finish with “.html”.
We would like to insert a variable at the end of each internal link. That means we would like to either replace “.html” with “.html?variable” or to simply append “?variable” to “.html”.
We played extensively with str_replace and searched the Web and forums a lot. Whatever we do it works fine except that it does not go down the code and does the replacement. For example:
Code: Select all
<php?
$old = “.html”;
$new = “.html?variable”;
$replace = str_replace($old, $new, $replace);
echo $replace;
?>Thanks.