Re: concatenating strings and \n's for mail...
| From: | 'Larry Rosenman' | Date: | Thu, 15 Feb 2001 02:11:44 +0000 |
| Subject: | Re: concatenating strings and \n's for mail... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-39795@lists.php.net to get a copy of this message | ||
* Janet Valade <janetv@systech.com> [010214 18:33]:
> I think you can do it like this:
>
> $mailbody="$varname\n$varname2";
That works. Hmm. I wonder why the concatenation didn't?
Thanks!
LER
>
> Janet
>
>
> > -----Original Message-----
> > From: Larry Rosenman [SMTP:ler@lerctr.org]
> > Sent: Wednesday, February 14, 2001 11:22 AM
> > To: php-general@lists.php.net
> > Subject: [PHP] concatenating strings and \n's for mail...
> >
> > Greetings,
> > I was trying to build up a multi-line body to use with the mail
> > command, using code similar to:
> > $mailbody = $mailbody . '\n' . $HTTP_POST_VARS["somefield"];
> >
> > when I sent the mail, the \n showed up, not as a new line, but a
> > literal \n. How do I fix this?
> >
> > This is with 4.0.4pl1.
> >
> > LER
> >
> >
> > --
> > Larry Rosenman
> > http://www.lerctr.org/~ler
> > Phone: +1 972-414-9812 E-Mail: ler@lerctr.org
> > US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749