[Solved] Passing PHP-variable to Javascript doesn’t work via PHP-function (not about global variables) [duplicate]
[ad_1] Don’t use global variables, it’s a poor practice to get in the habit of. You should pass the value into the function as an argument: function test23( $var_external ){ // do stuff to modify it return $var_external; } Then print the result: <?php print test23($var_external); ?> It’s hard to give better advice because I … Read more