/    Sign up×
Community /Pin to ProfileBookmark

adding a space between words

?

This is part of my code, but the words run together

$msg = “Thank you” .$name.”,

(this is what I receive) Thank youRJweb

what do I need to get a space between the “you$name

Thx for your help

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@criterion9Oct 08.2009 — You need to put the space there yourself:

$msg = "Thank you" .$name.",
[/quote]


Try:
[code=php]
$msg = "Thank you " .$name.",
[/code]
Copy linkTweet thisAlerts:
@RJwebauthorOct 08.2009 — thx that did, I am trying to learn php little bits at a time
Copy linkTweet thisAlerts:
@RJwebauthorOct 08.2009 — Sorry back with another problem,

this is an auto respond email back to the the user who submited

?

it is also posting the = sign, what am I doing wrong, thx again

the code (part of it)

$msg = "Thank you " .$name.",

$msg = ".$team."

I will process your request.

Fantacyracein League Admin");

the result

Thank you roy,

= redneck racing

I will process your request.

Fantacyracein League Admin
Copy linkTweet thisAlerts:
@NogDogOct 08.2009 — If you view it in this forum's [noparse][code=php]...[/code][/noparse] bbcode tags, I think you'll see from the syntax highlighting that your quoting is a bit confused:
[code=php]
$msg = "Thank you " .$name.",
$msg = ".$team."
I will process your request.
Fantacyracein League Admin");
[/code]

It would probably be simpler to just make use of the fact that in PHP variables are "interplated" within a double-quoted string literal:
[code=php]
$msg = "Thank you $name.
$team
I will process your request.
Fantacyracein League Admin";
[/code]
Copy linkTweet thisAlerts:
@RJwebauthorOct 08.2009 — ok thx, did what you said and works, now I am trying to add 1 more item

$message

mail($_POST['email'], 'Fantasyracein League Admin',

$msg = "Thank you $name,

$team

$message

I will process your request.

Fantacyracein League Admin");

but if I do what I have there adding $message the user receives everything that was submited from the form, i am trying to just include what they have submited in the comment field. (besides name and team which work fine now)

Thx for your help
×

Success!

Help @RJweb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...