Home > DeveloperSection > Interviews > How can I combined two variable together?

Posted on    June-13-2011 4:28 AM

 PHP PHP 
Ratings:
 2 Answer(s)
  1200  View(s)
Rate this:

Awadhendra Tiwari

Total Post:510

Points:2550
Posted on    June-13-2011 12:00 AM

$var1 = 'Welcome to ';
$var2 = 'TechInterviews.com';
First Mechanism for combining
$var 3 = $var1.$var2;Second Mechanism for combining$var3 = "$var1$var2";

KIRTI SHARMA
KIRTI SHARMA

Total Post:4

Points:20
Posted on    March-08-2017 6:02 AM

$var1 = 'Welcome to ';
$var2 = 'TechInterviews.com';
First Mechanism for combining
echo $var1.$var2;
Second Mechanism for combining
echo $var1,$var2;
Third Mechanism for combining
echo "$var1$var2";

Modified On Mar-08-2017 06:06:52 AM

Don't want to miss updates? Please click the below button!

Follow MindStick