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
It's a good idea to have JS variables and objects with data, but another approach is to manage them through internal jQuery storage $.data()
The advantages are obvious for non-trivial UI:
JS
var pagedata = jQuery.data( document.body, ' echo json_encode($var); ?>');
var break_data = JSON.parge(pagedata)