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
<?php $a="b"; $b="a"; $c=$$b; echo $c; ?>
Now its output will be b
How?
Let's solve it
- $c=$$b;
- $c=$a //Because $b value is a
- $c=b // Because $a value is b
0 comments:
Post a Comment