1 2 3 4 5 6 7 8 9 10 11 12 |
//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> |
I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.
Subscribe
Login
0 Comments