PHP Concatenation Operation

PHP Concatenation Operation
Every programming language has the concatenation operation. PHP also has the concatenation. First, what is Concatenation. Concatenation means join the two are more strings into a single sentence or to gather.

If you want to show the small message to your user after login into your application. Like that hi Jon welcome to application. In your application after user login to your application.

In that message user name come dynamic for different user. But the message will be same hi xxx welcome to application.
You can get the name in variable means you can concatenate the message and user name into a single sentence. In that place you can use the concatenation operation.

Like
echo "hi" . $username. " welcome to application";

In that concatenation you must use the dot . to join the several strings. In PHP we used the dot . to Concatenate the two strings.

Example:
<?php
$username ="Jon";
Echo "hi" . $username . "welcome to application";
?>

Output:
hi Jon welcome to application

Copyright Labw3