PHP Concatenation

Concating in PHP

In PHP a simple dot or period sign ( . ) is concatenation operator. Concatenation operator join the tow string or tow variable to gather.
For Example


<?php
$name = "Tanvir" ;
$fname ="Shabir" ;
echo $name . "S/O" . $fname;
?>

in above echo statement $name and $fname are two variable and "S/O" is direct text.
This will be output
Tanvir S/O Shabir
you can also do like this
echo 'first word' .
$c = 'second word' ;
echo 'b';
this will be output as
first word second word
This is because first echo statement a Dot in the end which show that the output of next echo statement is Concatenated with first echo .