PHP Double variable ($$var)

Double Dollar

The $$var  is a reference variable that stores the value.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <?php
        $x = "ayschools";
        $$x = "chennai";
        echo $x."<br/>";
        echo $$x."<br/>";
        echo $ayschools;
     ?>
</body>
</html>

Sample output:

Follow our Site to Know More about Programming Tricks

ayschools.com

Thank You…