In my code the $vl var is empty. Why?
JS;
<script>
$(document).ready(function(e) {
var vl = "ciao";
});
</script>
PHP:
<?PHP
$vl= "<script>document.write(vl); </script>";
echo "bariabile: ".$vl;
?>
PHP: document.wr" /> PHP: document.wr" /> PHP: document.wr"/>
In my code the $vl var is empty. Why?
JS;
<script>
$(document).ready(function(e) {
var vl = "ciao";
});
</script>
PHP:
<?PHP
$vl= "<script>document.write(vl); </script>";
echo "bariabile: ".$vl;
?>
This simply wont work, do try to read a few more tutorials and references for both php and javascript.