#19158 - 11/16/05 06:54 PM
a space between variables
|
Joined: Sep 2005
Posts: 102
Testing
UGN Member
|
UGN Member
Joined: Sep 2005
Posts: 102
Sacramento, CA
|
How do I print out a set of variables with a space between them. Sounds as though it should be simple as could be and perhaps it is,, however when you don't know how its maddening! example: <?php
$body1 = $LeadFirstName;
$body2 = $LeadLastName;
echo ($body1);
echo ($body2);
echo 'Thank you for registering. Your free ebook will be emailed to you within 48 hours.';
?> This prints out sallysmithThank you for registering. Your free ebook will be emailed to you within 48 hours. Assuming of course that sally is the first name and smith is the last name used when registering on the form. What I cant figure out how to do is make it space between sally and smith ($body1 and $body2). Any help is appreciated. Thanks!
Flipping houses in Sacramento market has been fantastic. Curious about what it takes to flip houses? Follow me at http://sacramentoflips.com.
|
|
|
#19159 - 11/16/05 07:18 PM
Re: a space between variables
|
Joined: Apr 2005
Posts: 247
KillHour
UGN Member
|
UGN Member

Joined: Apr 2005
Posts: 247
USA
|
I only have experience in C++, but the concept should be the same. Try echoing a space between the variables. <?php
$body1 = $LeadFirstName;
$body2 = $LeadLastName;
echo ($body1);
echo ' '
echo ($body2);
echo ' '
echo 'Thank you for registering. Your free ebook will be emailed to you within 48 hours.';
?>
"We can categorically state that we have not released man-eating badgers into the area."
-UK military spokesman Major Mike Shearer
|
|
|
#19160 - 11/16/05 08:43 PM
Re: a space between variables
|
Joined: Sep 2005
Posts: 102
Testing
UGN Member
|
UGN Member
Joined: Sep 2005
Posts: 102
Sacramento, CA
|
Worked like a charm. Thanks! As I thought, simple as can be. lol
Flipping houses in Sacramento market has been fantastic. Curious about what it takes to flip houses? Follow me at http://sacramentoflips.com.
|
|
|
#19162 - 11/16/05 10:54 PM
Re: a space between variables
|
Joined: Sep 2005
Posts: 102
Testing
UGN Member
|
UGN Member
Joined: Sep 2005
Posts: 102
Sacramento, CA
|
Gizmo you are correct. I tried your first example but was messing up my syntax and I tried several variations of your second one. However when I type it correctly as you have shown it is much easier! Thanks for the help!
Flipping houses in Sacramento market has been fantastic. Curious about what it takes to flip houses? Follow me at http://sacramentoflips.com.
|
|
|
#19166 - 11/18/05 02:01 PM
Re: a space between variables
|
Joined: Dec 2002
Posts: 3,255
§intå×
|

Joined: Dec 2002
Posts: 3,255
Likes: 3
Maryland
|
why do you guys use() with echo? lol You could just or or
|
|
|
|
Forums41
Topics33,701
Posts68,795
Average Daily Posts0
|
Members2,173
Most Online1,567 Apr 25th, 2010
|
|
|
Okay WTF?
by HenryMiring on 09/27/17 08:45 AM
|
|
|
|
|
|
|
|