IT SOLUTIONS
Your TECHNOLOGY partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Languages
-Collapse +Expand Categories
-Collapse +Expand Browse Language
   ► KBTo/From GuidesReferencePHPOperators   

PHP Operators

String Concatenation

PHP:  "String Concatenation" .

PHP uses a period (.) known as a dot to concatenate strings.

Syntax Example:
$fname = "Mike";
$lname = "Prestwood";

$fullname = $fname . $lname . "
";

echo "My name is " . "Mike.
";

Here's a complete example that demonstrates a few string concepts:

<?PHP
//Now using quotes.
$fname = "Mike";
$lname = "Prestwood";

$fullname = $fname . $lname;

echo $fullname . '<br>';

//Two literals too:
echo "My name is " . "Mike.<br>";

//Long strings.
$MyMsg = "This is a long string and
unlike some other languages. PHP allows
you to put strings on multiple lines
like this.";

echo $MyMsg;
?>

More Info

Code:  PHP String Concatenation (.)




-
  Load Time=less than 1 second.
 
Print This
-
 
Have a question? Need our services? Contact us now.
--Mike Prestwood

Call: 916-726-5675

email: info@prestwood.com


-
 
Connect With Us...
PrestwoodBoards
Join Us!
Facebook
Like our page!
Twitter
Follow us!
LinkedIn
Join Group
YouTube
View channel.
Go ahead!   Use Us! Call: 916-726-5675 


©1995-2013 Prestwood IT Solutions.   [Security & Privacy]   Made in the U.S.A..   No H1-B.   No offshoring.