Assign reference to a variable : Reference : Language Basics PHP Source Code


PHP Source Code » Language Basics » Reference »

 

Assign reference to a variable




<?php
   $value1 = "Hello";
   $value2 =& $value1; /* $value1 and $value2 both equal "Hello". */
   $value2 = "Goodbye"/* $value1 and $value2 both equal "Goodbye". */

   echo($value1);
   echo($value2);
?>

           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Language Basics
» Reference