js to php var code example
Example: js var to php
<script>
var res = "success";
</script>
<?php
echo "<script>document.writeln(res);</script>";
?>
<script>
var res = "success";
</script>
<?php
echo "<script>document.writeln(res);</script>";
?>