Re: save email in original layout
| From: | David Robley | Date: | Wed, 21 Feb 2007 10:44:24 +0000 |
| Subject: | Re: save email in original layout | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-249170@lists.php.net to get a copy of this message | ||
Richard Kurth wrote:
> I need to save an email in a mysql database so that it retains it's
> original layout
> so the example below
>
> Hello ,
>
> Do you dream of a better life? Do you wish you had financial stability
> and freedom? Would you like to be your own boss?
>
> would look like this when the file is saved
>
> \r\n Hello ,\r\n\r\n\r\n Do you dream of a better life? Do you wish you
> had financial stability and freedom? Would you like to be your own boss?
>
> how do I insert all the line spaces like above
If you insert a string with EOL characters into mysql, the EOL characters
are added as you might expect.
However, I suspect your question might really be:
How do I display this email in a web page with the original format? And two
potential answers are via php's nl2br() or HTML's <PRE> tags.
Ooh look, clever sigmonster :-)
Cheers
--
David Robley
It's as easy as 3.14159265358979323846264338327950...
Today is Boomtime, the 52nd day of Chaos in the YOLD 3173.