how to call javascript variable in php 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>";
?>