SyntaxFix
Write A Post
Hire A Developer
Questions
Basically, yes. You write alert('<?php echo($phpvariable); ?>');
alert('<?php echo($phpvariable); ?>');
There are sure other ways to interoperate, but none of which i can think of being as simple (or better) as the above.