HOW CAN I COMBINED TWO VARIABLE TOGETHER?

Awadhendra Tiwari

Total Post:505

Points:2525
Posted by  Awadhendra Tiwari
PHP 
PHP
 1428  View(s)
Ratings:
Rate this:
  1. Awadhendra Tiwari

    Post:505

    Points:2525
    How can I combined two variable together?

    $var1 = 'Welcome to ';
    $var2 = 'TechInterviews.com';

    First Mechanism for combining

    $var 3 = $var1.$var2;Second Mechanism for combining$var3 = "$var1$var2";

      Modified On Mar-27-2018 12:47:32 AM
  1. KIRTI SHARMA

    Post:4

    Points:20
    How can I combined two variable together?

    $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-27-2018 12:48:18 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!