In my HTML file, I'm using a string variable called {$var}
which is passed from a PHP file. How could I use {$var}
in a javascript function within the same html file? I would like to display this variable using the js function. This is what I have so far:
<span id="printHere"></span>
<script type="text/javascript">
var php_var = {$production};
$('#printHere').html(php_var);
</script>