Answers for "pass variable php to js"

PHP
5

js var to php

<script>
   var res = "success";
</script>
<?php
   echo "<script>document.writeln(res);</script>";
?>
Posted by: Guest on February-10-2020
8

php pass a variabele to js

<script>
'var name = <?php echo json_encode($name); ?>;
</script>'
Posted by: Guest on February-08-2020
0

how to use php echo data in javascript

<script>
'var name = <?php echo json_encode($name); ?>;
</script>'
Posted by: Guest on July-27-2020

Code answers related to "pass variable php to js"

Browse Popular Code Answers by Language