I am wondering why I don't get an alert message with the javascript code below. It seems that the variable xyz is not recognized/defined? I can't find the mistake... Thank you very much for your help!
main.php
<?php
...
$abc="http://www.path.de/image.jpg";
...
?>
<script type="text/javascript">
var xyz="<?= $abc ?>";
</script>
<script language="javascript" type="text/javascript">
window.alert(xyz);
</script>
No Alert message! Browser Output in source view:
...
<script type="text/javascript">
var yxz = "http://www.bla.de/asd.jpg";
</script>
<script language="javascript" type="text/javascript">
window.alert(yxz);
</script>
...