concatination with in single quote

Discussion in 'PHP' started by babaMBA, Jul 18, 2007.

  1. #1
    $value = "this is the value";
    echo ("$value");

    This is working fine

    but i need the value of $value as echo ('$value');

    How can i concatinate this inside single quoute ' ';

    I need this in mail function to send email as $email , as email is entered by end user.
     
    babaMBA, Jul 18, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Variables are not parsed between single quotes. But you can do this:

    
    echo 'blah blah blah' . $value . ' blah blah';
    
    PHP:
     
    nico_swd, Jul 18, 2007 IP
  3. chris-T33

    chris-T33 Peon

    Messages:
    98
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    echo "$var1 $var2";


    use double quote or:

    echo $var1.$var2;


    or to simply echo 1 variable:

    echo $var;
     
    chris-T33, Jul 18, 2007 IP