Line breaks in PHP
Posted: 11 January 2013 02:43 PM   [ Ignore ]
Newbie
Avatar
Rank
Total Posts:  7
Joined  2013-01-08

Does anyone know how to put line-breaks in PHP content?
I have a Flash contact form that send data to a PHP post script. That then send s the info to an e-mail account, but when it gets there the info doesn’t have any breaks.
Is there a way to put breaks in the content that the e-mail shows? Please help.
Also, if you could show me an example it would help because Im not to familiar with PHP syntax. Sorry for asking for so much. Please help!

 Signature 

make money online
Faschingskostüm
Karneval Kostüme

Profile
 
 
Posted: 12 January 2013 05:35 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  901
Joined  2011-09-19

hi Koshai,

I suppose it depends how you are viewing the output (the email). Is it HTML, or ‘flat’ text? In case it is HTML, a newline is
. For flat text it is “\n” (or if that does not work: “\r\n”): Note that it needs to be in double quotes (”), not single quotes (’).

echo "This line is followed by a newline \r\n"

Hope this helps,

Joost

 Signature 

To reply/post new questions: Please use the group WRDS/SAS on Google Groups! http://groups.google.com/d/forum/wrdssas

Profile