PHP » Operators » =

Syntax:
$var = expression
var
Variable to assign a value.
expression
The value to assign to the variable.

Assignment.

The assignment operator assigns a value to a variable. It is not to be mixed up with the operator for equality, "==".

Examples

Code:
<?php

$var = "php";
print $var;

?>
Output:
php
Explanation:

A variable is assigned a value and then printed.