PHP Programing language

Assignment Operator Examples
Previous Home Next

The main assignment operator is the = operator, which just assigns a value, like this, which stores the value 99 in $bottles_of_water_on_the_wall.

<title>Assighment operator</title>
$a = 3;
$b = &$a; // $b is a reference to $a
print "$a\n"; // prints 3
print "$b\n"; // prints 3
$a = 4; // change $a
print "$a\n"; // prints 4
print "$b\n"; // prints 4 as well, since $b is a reference to $a, which has
              // been changed<br />
3 3 4 4
Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Comment / Feedback: