View Single Post
  #17 (permalink)  
Old 04-21-2008, 01:07 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: Operations in PHP

Assignment Operators

The basic assignment operator is "=". Your first inclination might be to think of this as "equal to". Don't. It really means that the left operand gets set to the value of the expression on the rights (that is, "gets set to").

The value of an assignment expression is the value assigned. That is, the value of "$a = 3" is 3. This allows you to do some tricky things:

for e.g
PHP Code:
<?php

$a 
= ($b 4) + 5// $a is equal to 9 now, and $b has been set to 4.

?>
__________________
With,
J. Jeyaseelan

Everything Possible
Reply With Quote