Jump to content

[SOLVED] $var shows as $var, not the value?


wmguk

Recommended Posts

hey,

 

I'm really struggling with this, my code is:

 

    $mail->setFrom('Photography <"$email">');

 

however when the email comes through it is from "$email" , not $email (should be [email protected])

 

i tried it with out the "" too, but I just dont know how to get it to insert the value of $email (this is set from a query

$email = $row['email'];

 

any ideas how to break this code up?

Link to comment
https://forums.phpfreaks.com/topic/108291-solved-var-shows-as-var-not-the-value/
Share on other sites

$mail->setFrom('Photography <"' . $email . '">');

(if you want "Photography <"[email protected]">")

 

or

 

$mail->setFrom('Photography <' . $email . '>');

(if you want "Photography <[email protected]>")

 

or

 

$mail->setFrom('Photography ' . $email);

(if you want "Photography [email protected]")

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.