References In PHP:
What PHP References are?
In PHP references means to access the same variable by two or more different names. References are not like C pointers means these are not for storing address or any other pointer arithmetic. The references can be linked to hardlinking in Unix filesystem.
This tutorial covers three basic operations performed by references, assigning values by references, passing by references, returning by references etc.
Assign by reference:
PHP Reference Example:
echo"Value of \$var1:".$var1."<br/>";
echo"Value of \$var2:".$var2."<br/>";
Value of $var1:12
Value of $var2:12
Posted on: March 5, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles