in the HTML use
<script src="externaljs.php"></script>
and in the PHP file use the following header to identify that the content is JavaScript:
header('Content-Type: application/javascript');
in the HTML use
<script src="externaljs.php"></script>
and in the PHP file use the following header to identify that the content is JavaScript:
header('Content-Type: application/javascript');