how to assign value of php variable to javascript variable code example
Example: how to assign value of a js variable to a php variable
<script> document.cookie = "myJavascriptVar = " + myJavascriptVar </script>
<?php
$myPhpVar= $_COOKIE['myJavascriptVar'];
?>