Re: save email in original layout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux