I’m going to show you what I’ve done with the PHP package of JSMIN.
If you download the PHP package you’ll see how to use is simple:
<? require 'jsmin-1.1.1.php'; echo JSMin::minify(file_get_contents('example.js')); ?>
Then put the snippet below where ever you would like the script tag to appear. Sometimes people put it in the <head> of the document and sometimes right before the </body>
<? // Not to worry, this outputs the actual <script> tag echo drawMinJS( 'js/finalfile.min.js', array( 'js/global.js', 'js/thickbox.js', 'js/twitter.js', 'js/events.js' ) ); ?>