<?php $num=88; ?> <script> var a = <?php echo $num;?>; alert(a); </script>
<?php $num = 88; echo "<script>alert( $num )</script>"; ?>