SyntaxFix
Write A Post
Hire A Developer
Questions
instead you could easily do it this way :
<html> <body> <script type="text/javascript"> <?php $myVar = "hello"; ?> document.write("<?php echo $myVar ?>"); </script> </body>