You are here: Re: How to have line breaks in this text « PHP Programming Language « IT news, forums, messages
Re: How to have line breaks in this text

Posted by John Dunlop on 11/30/06 08:46

Rock:

> I am going bananas trying to get text breaks and empty lines into this text
> which is sent in an email.

Lines in an RFC2822 message are separated by
carriage-return/line-feed pairs. Bear in mind that lines are a
property of the data, not necessarily of the presentation of that data.

> I have tried "'s and \n and r\n\ but the text in the email still wraps and also
> I see the code in the text.

\r\n in a double-quoted string _is_ a CRLF pair. (I assume r\n\
was a typo.)

Short of using U+00A0 'NO-BREAK SPACE', the text would normally
wrap in smaller viewports.

> define('UNOTIFY_MESSAGE','Hello, You have requested a Response. Choose a pdf
> file and download it. Read it then come back to this site. Use the email
> address and password you used to Login into your Account. Thank you for
> supporting us and enjoy your day');

Since that string is single-quoted, \n and \r wouldn't be
interpreted. Either double quote the string or jump out of the
single-quotes and concatenate the CRLF pairs.

--
Jock

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация