Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to change php variable value in javascript

<?php
$php_var = "This is used to change php values to js";
?>
<script>
var js_var = '<?php echo $php_var ;?>';
document.write(js_var);
</script>
 
PREVIOUS NEXT
Tagged: #change #php #variable #javascript
ADD COMMENT
Topic
Name
7+8 =