Jump to content

[SOLVED] Parameter Passing


d.shankar

Recommended Posts

you missed out the semi-colin

<?php
$str="from php";
?>
<script>
var abc="<?php echo($str) ?>";
alert(abc);
</script>
<?php
?>

 

Many programmers continue this habit when writing JavaScript, but in general, semicolons are  optional! However, semicolons are required if you want to put more than one statement on a single line.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.