This article describes the PHP value assignment and address assignment usage. Share to everyone for your reference. Specifically as follows:
?
| 1 2 3 4 5 6 7 8 9 10 11-12 |
<?php $name = ' Simon '; Assigning value to variable $name (value Assignment) $name _b = $name; Assign value to variable $name_b (value Assignment) $addr = & $name; Assign value to variable $addr (address assignment) $name = "Elaine"; Change the value of the $name echo $name; Output $name, you will find that the value of $name has changed echo $name _b; Output $name_b, you will find that the $name_b value has not changed echo $addr; Output $ADDR, you will find that the value of $addr has changed $addr = "Helen"; Change the value of the $addr echo $name; Output $name, it is found that the value of $name has changed echo $addr; Output $ADDR, you will find that the value of $ADDR has changed?> |
I hope this article will help you with your PHP program design.