Variables in PHP: Assign by reference
- This means that the new variable simply references (in other words, "becomes an alias for" or "points to") the original variable.
- Changes to the new variable affect the original, and vice versa.
- To assign by reference, simply prepend an ampersand (&) to the beginning of the variable which is being assigned (the source variable).
- Only named variables may be assigned by reference.
Assign by reference