Advanced Variables and Using Them by Reference in PHP

PHP

Variables by Reference Variables can also hold their value as a reference to another value. This means, a variable simply points to another variable. So whatever value the other variable holds, the reference variable also holds the same. For reference assignment we use an ampersand sign (&) after the equals to sign (=) while assigning a variable. Example: <?php $var1…