1<script>
2 document.cookie = "js_var = " + This is used to chang js to php
3</script>
4<?php
5 $php_var= $_COOKIE['js_var'];
6 echo $php_var;
7?>
1<?php
2$php_var = "This is used to change php values to js";
3?>
4<script>
5var js_var = '<?php echo $php_var ;?>';
6document.write(js_var);
7</script>