[Solved] how to assign php value to javascript variable? [closed]


if you are writing your code on a .php file then javascript variables need to be enclosed within tag and there you can use php variables directly by assinging variable in your case like var java_id= “”; inside script tag… however if you are trying to directly access php variable in your .js file then you need to create global javascript variable before including your .js file…

solved how to assign php value to javascript variable? [closed]