Sponsor Advertisements help keep UGN Security Online.
Sponsor Advertisements help keep UGN Security Online.
Want to earn prizes for clicking online advertisements? Join Rewards1.com.
|
|
|
#19158 - 11/16/05 06:54 PM
a space between variables
|
UGN Member
Registered: 09/21/05
Posts: 102
Loc: 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.
|
|
Top
|
|
|
|
Sponsor Advertisements help keep UGN Security Online.
Sponsor Advertisements help keep UGN Security Online.
|
|
#19159 - 11/16/05 07:18 PM
Re: a space between variables
|
UGN Member
Registered: 04/15/05
Posts: 247
Loc: Tonawanda, NY
|
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
|
|
Top
|
|
|
|
#19160 - 11/16/05 08:43 PM
Re: a space between variables
|
UGN Member
Registered: 09/21/05
Posts: 102
Loc: 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.
|
|
Top
|
|
|
|
#19162 - 11/16/05 10:54 PM
Re: a space between variables
|
UGN Member
Registered: 09/21/05
Posts: 102
Loc: 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.
|
|
Top
|
|
|
|
#19166 - 11/18/05 02:01 PM
Re: a space between variables
|
UGN Elite
   
Registered: 12/03/02
Posts: 3255
Loc: Maryland
|
why do you guys use() with echo? lol You could just or or
_________________________
My New site OpenEyes
|
|
Top
|
|
|
|
|
Registered: 03/07/02
Posts: 270
|
|
2198 Members
46 Forums
24877 Topics
60047 Posts
Max Online: 1567 @ 04/25/10 10:20 AM
|
|
|
0 registered (),
336
Guests and
239
Spiders online. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|