how to fix the SyntaxError: unterminated string literal when embed php in javascript? -


when try this:

var app_app = <?=$app_app?>; 

i got error:

syntaxerror: unterminated string literal var app_app = '<br /> 

strange, can me ?

var app_app = "<?php echo $app_app; ?>"; 

note: have echo out php variable define javascript , wrap inside quotes


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -