I am using the same line of code to echo a link onto my page in two locations and getting different results. One is inside an < a > tag and the other is inside a < script > tag. Below are the two excerpts of code (from the same tpl file) and the results:
<a href="<?php echo $links['current_path']['href']; ?>" role="button"><?php echo $btn['text']; ?></a>
Results in:
<a href="index.php?route=module/jw/list&token=a4c693a4e38916fc03af23ad4fe17188" role="button">Filter</a>
However in the script tag I have
url = "<?php echo $links['current_path']['href']; ?>"
And my result is
url = "index.php?route=module/jw/list&token=a4c693a4e38916fc03af23ad4fe1"
Notice the '&' after the route parameter. It is displaying the html code when I echo it inside the script tag. I know I can convert it in the second instance, but I am curious as to why I would need to. Why is the same php command making the symbol echo differently in various parts of the source code?