Learn PHP:14-The Assignment Operator

Posted: November 3, 2010 in PHP

The Assignment operator is the most widely used and well known of all the operators in PHP. You use it every time you create a variable. The “=”(equal to) sign is used, and what it does is it takes the expression from the right and places it into the operand on the left. It is simple.

In this example we use the assignment operator(=) to place a value of 8 into the variable:

$var1 = 8;

We can also combine operators together to produce expression results that are set into our variables as value. We demonstrate this in the next few lessons quite well. Let us continue on.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s