I have a problem with my javascript string in php. So I tried to add a string to a variable in switch but I get error :
$blocPub = '<script type="text/javascript">
var rdads=new String(Math.random()).substring (2, 11);
document.write('<sc'+'ript type="text/javascript" src="http://test.com?sdsds?bhhj'+rdads+'dsdsdsdsds"></sc'+'ript>');
</script>';
The error is in document.write. Exist a method to ecranate this string? Please help me!! Thx in advance.