Create javascript variable from php template using <script> tag – PHP/WordPress
I'd like to dynamically assign a JS variable from one of my php page-templates in order to use the assigned variable within my bundle.js file. I'm doing this using this way: template-some-page.php: <?php echo "<script> var javascriptVar = 'success'; </script>";…