I have all my javascript/jquery code in a file and include it into my page. Without having apache process js files as php what would be the best way to pass data from php to
Instead of mis-using HTML for passing data (which has to be parsed) you should actually echo JavaScript code. For example, PHP could generate:
As this is declared in a global scope of your page your script can actually access these variables.
The only thing you have to look out for are race conditions. Your script will have to execute after the data has been defined. However, with a standard jquery on-dom-ready callback that is not a problem.