javascript - "Uncaught SyntaxError: missing ) after argument list" in PHP code -


when add line of code in php code ...

echo 'document.write("<input type="hidden" />");'; 

... obtain error .... (note javascript code writed php code ...).

this sample because original code more complex

uncaught syntaxerror: missing ) after argument list 

i've tried escape code in different manner no result

any suggestions? thank in advance ...

cesare

look @ quotes. have double quotes inside of double quotes. terminates string early. need escape them:

echo 'document.write("<input type=\"hidden\" />");'; 

Comments