FOLLOW US
4dots Software CODE BLOG

How to access PHP variable from Javascript

To access a PHP variable from Javascript, simple you PHP code to echo it as following.


var my_javascript_variable=<?php echo $MY_PHP_VARIABLE;?>

 

Please Donate!

Please Share!