SyntaxFix
Write A Post
Hire A Developer
Questions
Essentially:
<?php //somewhere set a value $var = "a value"; ?> <script> // then echo it into the js/html stream // and assign to a js variable spge = '<?php echo $var ;?>'; // then alert(spge); </script>