Reference Variable in php

In this tutorial you will get the knowledge about reference variable. Any variable will be called reference variable, if it contains another variable as its value.

Reference variable in php




echo $c;


Now its output will be b

Let's solve it
  1. $c=$$b;
  2. $c=$a //Because $b value is a
  3. $c=b // Because $a value is b
So $c is a reference variable.