Algo asi puede funcionar
==============================================
Código:
<script>
var global =0;
</script>
<?
$global_php = 1;
?>
<script>
global = parseInt("<? echo $global_php; ?>");
</script>
================================================== ===
lo otro seria
Código:
<?
$global_php = 1;
?>
<script>
var global = "<? echo $global_php; ?>";
</script>
=============================================.