PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
oldcelt
Forum Newbie
Posts: 7 Joined: Wed Aug 10, 2011 5:29 am
Post
by oldcelt » Wed Oct 02, 2013 3:55 am
Code: Select all
$message .= "<h1>This is headline.</h1>";
This is one of the headers in some php email code intended for sending HTML.
I don't quite understand what the .= construct is doing. Can anyone help please?
Celauran
Moderator
Posts: 6427 Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada
Post
by Celauran » Wed Oct 02, 2013 6:08 am
Concatenation and assignment.
Code: Select all
$string = "foo" . "bar";
// Same thing
$string = "foo";
$string .= "bar";
oldcelt
Forum Newbie
Posts: 7 Joined: Wed Aug 10, 2011 5:29 am
Post
by oldcelt » Wed Oct 02, 2013 7:02 am
Ta very much!
priyankagound
Forum Commoner
Posts: 27 Joined: Thu Sep 19, 2013 2:53 am
Post
by priyankagound » Thu Oct 03, 2013 4:22 am
Its Concatenation assignment ( .= ).
for example:-
$txt1 = "Developers"
$txt1 .= " Network"
Now $txt1 contains "Developers Network"
Hope i cleared your doubts.