PHP Operators: Using String Concatenation Operator
You can concatenate or add strings together using the PHP string concatenation operator represented by the period sign ( . ). refer to the examples below.
<?php // intialize variables $username = "daniel"; $domain = "danieldumas.com"; // the variable string $username and $domain can be combine using the concatenation operator $email_address = $username . '@'. $domain; //the variable $email_address now contains the value "daniel@danieldumas.com" ?>
You can also concatenate simultaneously. .
<?php $name = "dan"; //add and assign values to the string $name.. $name .= "iel"; //the variable $name now contains "daniel" ?>
Tags: PHP, PHP Tutorials


Hi everyone im 






January 19th, 2009 at 5:07 am
[...] more: PHP Operators: Using String Concatenation Operator Related ArticlesBookmarksTags PHP PHP is a computer scripting language. Originally [...]
January 22nd, 2009 at 4:26 pm
You provide good tutorial here – images, examples etc.
Concatenation though is one of the most basic steps. Wouldn’t you like to concatenate this part with others so we don’t have to go to other page to read this?
Reply
January 31st, 2009 at 1:19 pm
I can’t get it because I’m not good at PHP, well I just drop by.
Anyway, is it ok if we exchange links? Please add me to your blogroll http://www.semidoppel.com, and please visit my site, you can leave comments and exchange thoughts with me
semidoppel’s last blog post..PACQUIAO versus HATTON
Reply
February 11th, 2009 at 9:18 am
Thank you! Very useful. How would you make the above a hyperlink? Actually, I am most interested in, not mail, but using it to create a dynamic URL hyperlink.
Reply
February 12th, 2009 at 9:27 am
yES, agree thank’s for this tutorial, concatenation is basic input to newbie users,.Please wrote more topics about PHP.
Hectic Capiznon Bloggers 2009’s last blog post..A newbie Hectic
Reply
March 14th, 2009 at 6:55 am
Nice to see something like this tutorial!
Reply