what is combined concatenation operator

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
pankajdeoria
Forum Newbie
Posts: 15
Joined: Thu Mar 12, 2009 10:58 am
Location: Bangalore,India

what is combined concatenation operator

Post by pankajdeoria »

what is combined concatenation operator?

THank You.
Pankaj Gupta
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: what is combined concatenation operator

Post 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"
?>
Post Reply