RE: [PHP] Line breaks
| From: | John W. Holmes | Date: | Fri, 07 Mar 2003 04:43:13 +0000 |
| Subject: | RE: [PHP] Line breaks | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138559@lists.php.net to get a copy of this message | ||
> I have a basic feedback form with:
> your name
> your e-mail address
> E-Mail Subject
> Message
>
> The problem is the line breaks...
>
> For example, they might type in the following (between the dashed
> lines) into the Message textarea:
> ------------------------------
> Hi,
>
> Please send me some info.
>
> Thanks,
> Gav
> ------------------------------
>
> When I receive the mail, however, it looks like this:
> ------------------------------
> Hi, Please send me some info. Thanks, Gav
> ------------------------------
>
> This is fine for such a short message, but lengthy messages would be
> horrid to read if all the line breaks were taken out... Not to mention
> an unprofessional appearance...
You must be sending HTML mail??
Try the nl2br() function. HTML doesn't understand newlines, only <br>
elements.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/