Run PHP code inside JavaScript

Insert this code into your site .htaccess file.


AddType application/x-httpd-php .js
AddHandler x-httpd-php5 .js

<FilesMatch ".(js|php)$">
SetHandler application/x-httpd-php
</FilesMatch>