Assignment operators are used to assign a variable equal to a value or set a variable to another variable’s value. Such an assignment of value is done with the “=”, or equal character.

Example:
Code:

 $a = 8;
 $b = $a;
echo $a."
"; echo $b;

Output:

8
8

Explanation:

Both $a and $b contain the value 8.

eXTReMe Tracker