Syntax help...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
churd
Forum Newbie
Posts: 8
Joined: Tue Feb 09, 2010 7:44 pm

Syntax help...

Post by churd »

I am trying to convert this static line:

Code: Select all

$to = "FirstName LastName <somewhere@something.com>";
To a dynamic, variable driven version:

Code: Select all

$to = "$wo_send_fname , $wo_send_lname , "<" $wo_send_email ">";
I know my syntax is completely messed up, but I can't for the life of me wrap my head around how to treat variables differently than text.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Syntax help...

Post by Weirdan »

Code: Select all

 
$to = "{$firstName} {$lastName} <{$email}>";
 
churd
Forum Newbie
Posts: 8
Joined: Tue Feb 09, 2010 7:44 pm

Re: Syntax help...

Post by churd »

Weirdan wrote:

Code: Select all

 
$to = "{$firstName} {$lastName} <{$email}>";
 
...... I promise, one day I will ask a hard question :) .

Thank you so much!
Post Reply