<!-- index.html --> <script type="text/javascript" src="somescript.php"></script>
<?php //somescript.php header('Content-type: text/javascript'); $one = 1; ?> var one = <?= $one ?>; alert(one);