NYCPHP Meetup

NYPHP.org

[nycphp-talk] Concatenation

Ken Robinson kenrbnsn at rbnsn.com
Mon Jan 14 21:53:24 EST 2008


At 09:29 PM 1/14/2008, David Krings wrote:
>Hi!
>
>I saw this in email thread going on:
>
>$message = "\nName: $name\n\n";
>$message .= "E-mail: $email\n\n";
>
>Is that doing the same as
>$message = "\nName: $name\n\n";
>$message = $message."E-mail: $email\n\n";

Yes. It's similar to using the "+=" or "-=" operator combinations:

$i = 1;
$i += 2;
echo $i;

will print 3.

Ken 




More information about the talk mailing list