javascript assign variable from php code example
Example: javascript php variable
<script type="text/javascript">
var php_var = "<?php echo $php_var; ?>";
</script>
<script type="text/javascript">
var php_var = "<?php echo $php_var; ?>";
</script>