{"id":389,"date":"2011-10-05T14:33:48","date_gmt":"2011-10-06T00:33:48","guid":{"rendered":"http:\/\/mymonkeydo.com\/?p=389"},"modified":"2011-10-05T14:33:48","modified_gmt":"2011-10-06T00:33:48","slug":"javascript-files-with-php","status":"publish","type":"post","link":"https:\/\/mymonkeydo.com\/javascript-files-with-php\/","title":{"rendered":"Javascript Files with PHP"},"content":{"rendered":"
Below is a great article on getting your PHP to print out a javascript file and including it like any other javascript file. \u00a0 You basically just have to name the file something like “something.js.php” so that PHP knows to interpret the file. \u00a0Then include it like a normal javascript file. \u00a0In the something.js.php you can add a Header() function to make it render like a javascript file (include carriage returns).<\/p>\n