I have a php varaiable that I need to pass into a link in a javascript function
//In the config
<?php
define('THE_VAR', 'test');
?>
//On the page
<?php
$the_var = THE_VAR;
?>
<script>
(function()){
link = "test.site"+<?php echo json_encode($the_var); ?>+"/testing.js"
})();
</script>
I need the link in the javascript function to read.
test.site/test/testing.js