I am getting a parse error and it looks like there is an extra \ some where in the code that I need to remove, but the problem is I am exteremly new when it comes to PHP coding. Below is the Parse error that I am getting.
Parse error: syntax error, unexpected '\' (T_NS_SEPARATOR) in/data/19/4/6/136/4495788/user/5330466/htdocs/dolphin/cache/bx_templ_en_uni_ac7eaf05db40388a6e86a54028eb79a1.php on line 127
When I search the for the ' \ ' I find there are 12 \ in the document. Below is the code that contains all the \ in the document. Can some one review the code below and let me know which \ I need to remove.
this.tmpl = function tmpl(str, data){
// Figure out if we're getting a template, or if we need to
// load the template - and be sure to cache the result.
var fn = !/\W/.test(str) ?
cache[str] = cache[str] ||
tmpl(document.getElementById(str).innerHTML) :
// Generate a reusable function that will serve as a template
// generator (and which will be cached).
new Function("obj",
"var p=[],print=function(){p.push.apply(p,arguments);};" +
// Introduce the data as local variables using with(){}
"with(obj){p.push('" +
// Convert the template into pure JavaScript
str
.replace(/[\r\t\n]/g, " ")
.split("<%").join("\t")
.replace(/((^|%>)[^\t]*)'/g, "$1\r")
.replace(/\t=(.*?)%>/g, "',$1,'")
.split("\t").join("');")
.split("%>").join("p.push('")
.split("\r").join("\\'")
+ "');}return p.join('');");
// Provide some basic currying to the user
return data ? fn(data) : fn;
I thank you for your time and your help