I have a problem with my PHP template driven website. In one template file, I have this line:
cells[0] = "<input type=\"text\" name=\"Quantity" + lastindex + "\" size=\"7\"/>";
This is part of some javascript code in the template. Unfortunately, sometimes when the page is loaded this gets transformed into this:
cells[0] = "<input type="\""text\" name=\"Quantity" + lastindex + "\" size=\"7\"/>";
For some reason, the first \" is being surrounded by quotes becoming "\"". Does anyone have any idea why this might be happening? The worst thing is that refresing the page usually fixes this. The function which loads the template looks like this (simplified):
$file = @fopen($template_fullpath, "r");
$contents = fread($file, filesize($template_fullpath));
fclose($file);
return $contents;
Thanks in advance for any help you can give me,
Simon Steele
Programmers Notepad - http://www.pnotepad.org/