• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

PHP -What does this mean......

DaveL

Well-known member
#1
Im going through a few tutorials and was wondering if anyone would be able to tell me what ." means?

Ive tried google but not having much joy!

This is the context in which it is used -
PHP:
$contents .=
Plus if anyone knows ofa webpage that lists all of these kind of expressions with their meaning it would be really appreciated. I seem to know the basic ones, but theres a few popping up im not to sure on.
 
R

ragtek

Guest
#2
$var .= 'add me';

is the same as

$var = $var . 'add me';

you can do the same with + , -

hope this helps, (sorry, i don't know how this is called in english;) )
 

SheepCow

Well-known member
#8
I believe it's because in C if it was assignment (=) addition (+), it would have to be the same for other assignment-operation operators, and things like:

a =- 2;

The compiler wouldn't know if you mean "a equals minus 2" or "a subtract 2, assign to a" as whitespace has little meaning.