3 ms·How does PHP code inside a JS file get executed? Sounds to me like that's not the only problem in the code...by wvh 13y agoHow does PHP code inside a JS file get executed? Sounds to me like that's not the only problem in the code...daviddede 13y agoThe .js file is actually included in one of their templates (using include()). So the <?php code is executed at that point.mahmud 13y agoWhy isn't the Javascript code in a PHP comment? That is the usual way of "embedding" stringly-typed languages.