how to use js variable in php?
var val = "<?php echo $val ?>";
Example 1: js var to php
<script> var results = "good luck pakainfo.com"; </script> <?php echo "<script>document.writeln(results);</script>"; ?>
Example 2: using js variable in php
<?php $bool = false; $num = 3 + 4; $results = "Welcome to Pakainfo"; ?>
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.