Assigning a Variable by Reference : Reference « Language Basics « PHP
- PHP
- Language Basics
- Reference
Assigning a Variable by Reference
<html>
<head>
<title>Assigning a variable by reference</title>
</head>
<body>
<?php
$aVariable = 42;
$anotherVariable = &$aVariable;
$aVariable= 325;
print $anotherVariable;
?>
</body>
</html>
Related examples in the same category