RE: [PHP] Even easier Q:
| From: | James Moore | Date: | Thu, 31 Aug 2000 03:57:08 +0000 |
| Subject: | RE: [PHP] Even easier Q: | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-14514@lists.php.net to get a copy of this message | ||
>
> Sorry folks,
>
> This one has been a question of mine for weeks. How about getting a
> carriage return in my string?
>
> $header="$data[seller_fname] $data[seller_lname] ";
> $header.="<$data[seller_email]>";
> $header.="\nReply-To: edahnke@hotmail.com";
>
> produces:
>
> Mr. Seller <seller@gooutdoor.com> Reply-To: edahnke@hotmail.com
>
> I need:
>
> Mr. Seller <seller@gooutdoor.com>
> Reply-To: edahnke@hotmail.com
>
>
> I've read the FM and it says \n or \r , etc will produces spaces and
> carriage returns (don't recall the specifics) - but it has never worked
> as you might think.
Once again its HTML that is causing this.. use <BR> not \n (nl2br() will do
this) or do somthing like
echo nl2br(htmlspecialchars($header));
James