I think this is very strange, I must be doing it wrong, but still ... I am working on a page using PHP and TPL files. My TPL file has space in the footer for some extra lines if necessary.
For example, formatting with Javascript.
so in PHP I did this:
$foot = "<script type=\"text/javascript\">if(document.getElementById){loadEvents();}</script>";
then the $ foot variable is processed, and the result in HTML is as follows:
<script type="text/javascript">if(document.getElementById)</script>
So {loadEvents();} gone.
Does anyone see what I am missing here ... I seriously cannot find it. Did I forget to escape the character or something else?
source share