gebezis
06-25-2005, 09:39 PM
Is there a way to transfer the value of a variable from php to a JavaScript variable in a same document. I tried this but it gives JScript error....
<?php
$a = 1;
echo "
<script language='JavaScript'>
<!--
var a = ' " . $a . " ';
-->
</script>";
?>
<?php
$a = 1;
echo "
<script language='JavaScript'>
<!--
var a = ' " . $a . " ';
-->
</script>";
?>