Assign PHP Variable Value into Javascript Variable

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.


$name= "Rahul";
<script type="text/javascript">
var jvalue = 'Hi, <?php echo $name; ?>';
$abc = "<script>document.write(jvalue)</script>";
echo $abc;