Page 1 of 1

what is combined concatenation operator

Posted: Sun Mar 15, 2009 5:49 am
by pankajdeoria
what is combined concatenation operator?

THank You.
Pankaj Gupta

Re: what is combined concatenation operator

Posted: Mon Mar 16, 2009 12:45 am
by omniuni
Combined operators allow you to update the value of a variable easily. Here's an example, the second one is combined concatenation.

Code: Select all

<?php
$num = 3;
$num += 2;
echo $num; //prints "5", the sum of 3 and 2
 
$greeting = 'Hello, ';
$greeting .= 'Pankaj';
echo $greeting; //prints "Hello, Pankaj"
?>