//here we have one php variable
<?php
$var = "This is my string variable in php";
?>
//In javascript/jQuery
<script type = "javascript">
var spge = '<?php echo $var ;?>'; // need to put single/double quote there for string variable
alert(spge);
</script>
|
0 comments:
Post a Comment