Hi guys Today, I will tell you through this tutorial how you can get the php variable value in javascript variable value.
First of all, you can create a php file. You can keep any name for this file.
variable.php
<?php $name= "Rahul"; ?> <script type="text/javascript"> var jvalue = 'Hi, <?php echo $name; ?>'; </script> <?php $abc = "<script>document.write(jvalue)</script>"; echo $abc; ?>