75
rated 0 times
[
81]
[
6]
/ answers: 1 / hits: 16938
/ 12 Years ago, mon, may 14, 2012, 12:00:00
I know that there are many questions about this but I cannot make it work.
My HTML (test.htm) has only this code
<?php
$var = 'foo';
?>
<script type=text/javascript language=javascript>
var val = <?=$var?>;
alert(val);
</script>
But when I open the file with the browser the value of val is <?=$var?>
and not 'foo'
How can I make it work?
More From » php