Discussion board
How to concatenate two strings ?
By Balu Prasad
Concatenate two strings....
Reply
Post   Reset
Teacher SiliconIndia replied to Balu Prasad Wednesday, March 17, 2010
Hi Balu,
There is only one string operator in PHP.
The concatenation operator ( . ) is used to put two string values together.
To concatenate two string variables together, use the concatenation operator.
<?php
$str1 = "Hello Anand shukla.";
$str2 = "What is this ?";
Echo $str1."".$str2;
?>
OUT PUT: Hello Anand shukla What is this